Questions tagged [sycl]

SYCL (pronounced ‘sickle’) is a royalty-free, cross-platform abstraction layer that builds on the underlying concepts, portability and efficiency of OpenCL that enables code for heterogeneous processors to be written in a “single-source” style using completely standard C++.

SYCL (pronounced ‘sickle’) is a royalty-free, cross-platform abstraction layer that builds on the underlying concepts, portability and efficiency of OpenCL that enables code for heterogeneous processors to be written in a “single-source” style using completely standard C++. SYCL is developed by the Khronos group.

SYCL single-source programming enables the host and kernel code for an application to be contained in the same source file, in a type-safe way and with the simplicity of a cross-platform asynchronous task graph. SYCL includes templates and generic lambda functions to enable higher-level application software to be cleanly coded with optimized acceleration of kernel code across the extensive range of shipping OpenCL 1.2 implementations.

Developers program at a higher level than OpenCL C or C++, but always have access to lower-level code through seamless integration with OpenCL, C/C++ libraries, and frameworks such as OpenCV™ or OpenMP™.

Implementations of SYCL include ComputeCpp and triSYCL.

151 questions
2
votes
1 answer

ERROR: implicit capture of 'this' is not allowed for kernel functions, SYCL, DPCPP

I try to write a kind of "map" class that wraps OneAPI calls hiding hardware targeting issues through some parameter specifying the kind of target (CPU or GPU/Accelerator). The map, directs code to SYCL kernel or to TBB to implement the map…
Sahar Sa
  • 25
  • 9
2
votes
3 answers

Why does printf() work within a kernel, but using std::cout doesn't?

I have been exploring the field of parallel programming and have written basic kernels in Cuda and SYCL. I have encountered a situation where I had to print inside the kernel and I noticed that std::cout inside the kernel does not work whereas…
Atharva Dubey
  • 832
  • 1
  • 8
  • 25
2
votes
1 answer

sycl/dpc++ accessor vs. global_ptr in kernel function object

With the following toy code using Intel OneAPI beta6. #include #include namespace sycl = cl::sycl; const int SIZE=1; class Increment_accessor { public: Increment_accessor(sycl::accessor
justapony
  • 129
  • 8
2
votes
2 answers

Sycl kernel-call very slow

I am new to stackoverflow, sycl and gpu-programming. I have a project with a working basic sycl kernel. The logic is working so I'm skipping it in the question. Also during the compiling and execution is no error. The big problem is now that the…
Florius
  • 23
  • 3
2
votes
1 answer

intel sycl supports a-head-of time compile and cross-compile ARM?

I am considering to build SYCL and OpenCL environment with the intel sycl and pocl by a-head-of-time compile and run them on ARM CPU board. In theory, I think that is possible if intel sycl supports cross-compile. Could you tell me some comment or…
jin
  • 21
  • 1
2
votes
1 answer

Is it possible to attach an asynchronous callback/continuation to a SYCL kernel?

I have a collection of thousands of SYCL kernels to execute. Once each of these kernels has finished, I need to execute a function on a cl::sycl::buffer written to by said kernel. The methods I'm aware of for achieving this are: by using RAII; the…
invexed
  • 645
  • 3
  • 10
2
votes
1 answer

Using Barriers in SYCL

I am doing matrix multiplication in SYCL and have a working code in which i used only range in parallel_for instead of using nd_range in parallel_for. Now i want to use barriers in it and as far as i read barriers can only be used with nd_range,…
ZSA
  • 85
  • 1
  • 13
2
votes
1 answer

What is host_selector in SYCL device selector?

I am newbie in SYCL, OpenCL and GPU programming. I read about the device selector in the SYCL and found the following four: default_selector : Devices selected by heuristics of the system. If no OpenCL device is found then it defaults to the SYCL…
Akhilesh
  • 1,024
  • 1
  • 9
  • 26
1
vote
3 answers

How do I Implement a Custom 4-Dimensional Array Viewer/Wrapper in SYCL 2020 / DPC++?

In conventional C++, it's possible to create a multi-dimensional "viewer" or "wrapper" to a 1D buffer in linear memory by (1) defining a custom ArrayWrapper class, (2) overriding the () or [] operator as its "accessor", doing the address calculation…
比尔盖子
  • 2,693
  • 5
  • 37
  • 53
1
vote
1 answer

What is the contiguous dimension in a SYCL kernel? In a buffer? In an image?

What is the contiguous dimension in an N-dimensional SYCL kernel, i.e. the dimension in which threads of a work-group are expected to belong to the same warp/wavefront? I would have expected it to be dimension 0, but some resource out there suggest…
Limmershin
  • 135
  • 4
1
vote
1 answer

Is there 1 SYCL implementation to rule all platforms?

Apologies for the slightly jokey title, but I couldn't find another way to concisely describe the question. I work in a team that use predominantly OpenCL code with a CPU fallback. For the most part this works fine, except when it comes to Nvidia…
1
vote
1 answer

SyCL ComputeCpp: how to support both SPIR and PTX bitcode at runtime

I recently did some experiments with the SyCL ComputeCpp library, we good results. However, in the application I'd like to achieve, I should support both nVidia and AMD/Intel cards on runtime. At the time of this writing, it seems to me nVidia is…
1
vote
1 answer

Which SYCL buffer constructors cause host write back on destruction?

SYCL buffers have the fun effect where when they are destroyed they may write back into the host memory from which they were formed. This is specified in 3.9.8.1 of the sycl 2020 standard: Buffer destruction: The destructors for sycl::buffer,…
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
1
vote
0 answers

SYCL parallel_for condition as a while loop

I am new to the oneAPI with SYCL and I have the following function q.submit([&](auto &h) { h.parallel_for(range<1>(size), [=](id<1> idx) { m_Add(C,A,B,idx); m_Multiply(D,C,A,idx); }); …
solarlate
  • 11
  • 1
  • 2
1
vote
1 answer

sycl vector types are not marked as device copyable

This line: static_assert( sycl::is_device_copyable::value, "The vector types should be copyable." ); Fails with the static assert error for all vector types in sycl. This is using: dpcpp -v Intel(R) oneAPI DPC++/C++ Compiler…
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
1
2
3
9 10