Код: Выделить всё
#include
#include
#include
#include
#include
int main()
{
try
{
sycl::queue gpu_queue(sycl::gpu_selector_v);
int number = 5;
{
sycl::buffer int_buffer(&number, sycl::range(1));
sycl::event current_event = gpu_queue.submit([&](sycl::handler& cgh){
sycl::accessor int_accessor(int_buffer, cgh);
sycl::stream gpu_stream(0, 1024, cgh);
cgh.single_task([=](){
int_accessor *= 5;
gpu_stream
Подробнее здесь: [url]https://stackoverflow.com/questions/79799923/sycl-gpu-kernel-not-executing-the-code-without-raising-any-exception[/url]
Мобильная версия