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
0
votes
1 answer

Cannot find libspirv-nvptx64--nvidiacl.bc when used intel clang++ to build binary for nvidia cuda GPU

I used below command to build binary for nvidia GPU: clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -o simple-sycl-app-cuda But got below error message: clang++: error: cannot find 'libspirv-nvptx64--nvidiacl.bc'; provide…
cctv
  • 1
0
votes
1 answer

Is it better to pass a sycl::vec by value or by reference?

In Sycl,if I want to pass a sycl::vec to another function, is it better to pass it by value or by const reference? How can I see the output of the target code? Is there something like compiler explorer for sycl cuda? (I'm using the Intell…
Eric Yen
  • 3
  • 2
0
votes
1 answer

Error facing with range function in DPC++

I'm new to Sycl/DPC++ language. I wrote a sample vector addition code using Unified shared memory (USM): #include #include #include using namespace sycl; int main() { int n=100; int i; queue q{ }; …
abc
  • 13
  • 2
0
votes
1 answer

(SYCL) local_accessor problem (no template named 'local_accessor')

Hi I am so new to c++ and sycl. So please be as specific as possible. Here is the code that I try to compile: /* Intel oneAPI DPC++ dpcpp -Qstd=c++17 /EHsc hellocl.cpp -Qtbb opencl.lib -o d.exe Microsoft C++ Compiler cl /EHsc…
enes1994
  • 13
  • 2
0
votes
1 answer

Unable to get values from kernel code in SYCL/DPC++

I am a beginner in SYCL/DPC++. I have created an array and by using buffers I am updating the values in the device code but when I try to print the updated values in the kernel/device code I am getting error. I am able to print the updated values…
sv6
  • 11
  • 4
0
votes
1 answer

Unexpected/Incorrect Results while running SYCL/DPC++ code

I am a beginner in SYCl/DPC++. I want to print multiples of 10 but, instead of that, I am getting 0's in place of that. I am using the USM (Unified Shared Memory) and I am checking the data movement in the shared memory and host memory implicitly.…
sv6
  • 11
  • 4
0
votes
1 answer

dpc++ error Command group submitted without a kernel or a explicit memory operation. -59 (CL_INVALID_OPERATION)

I was trying out sycl/dpc++. I have written the below code. I am creating an array deviceArr on device side to which values of hostArr are copied using memcpy and then values of the devicearray are incremented by 1 using a parallel_for kernel and…
ArunJose
  • 1,999
  • 1
  • 10
  • 33
0
votes
1 answer

Use of std::atomic_ref / cl::sycl::atomic_ref in SYCL for read after write and write after read dependencies

Lets say we have 2 vectors V and W of n length. I launch a kernel in SYCL that performs 3 iterations of a for loop on each entity of V. the description of for loop is as follows: First the loop computes the value of W at an index (W[idx]) based on…
NikhilT
  • 3
  • 2
0
votes
1 answer

How to implement a recurring real-time task in SYCL

What is the recommended way to implement a soft real-time task in SYCL? Is it to continually re-submit operations to the command queue and the call wait (or get_access() ) to trigger the kernel execution and…
JeffV
  • 52,985
  • 32
  • 103
  • 124
0
votes
1 answer

DPCPP: Work on 1D vector like a 2D vector in SYCL+ OneAPI

I try to execute my slice_matrix function on GPU. The actual function is: //Function which Slice a specific part of my matricx template std::vector> slice_matrix(std::vector> mat, int i, int j, int…
saharsa
  • 467
  • 1
  • 7
  • 24
0
votes
1 answer

Error no matching function for call to 'slice_matrix' for Cross Correlation function+Sycl

I try to write 2D Cross correlation in Sycl and OneAPI. The idea is to write a kind of Map skeleton which wraps OneAPI calls hiding hardware targeting issues through some parameter specifying the kind of target (CPU or GPU/Accelerator). this is my…
saharsa
  • 467
  • 1
  • 7
  • 24
0
votes
1 answer

Cross Correlation and Errors in Sycl part+ DPCPP

I try to write Cross Correlation function. In my program I wrote a Map skeleton which wraps OneAPI calls hiding hardware targeting issues through some parameter specifying the kind of target (CPU or GPU/Accelerator). The problem is that, in the Sycl…
SSAH
  • 23
  • 5
0
votes
1 answer

ERROR: kernel parameter has non-trivially copy constructible class/struct type+sycl+tbb

I try to provide a kind of "map" skeleton that wraps OneAPI calls hiding hardware targeting issues through some parameter specifying the kind of target (CPU or GPU/Accelerator). my Map skeleton pass function and its derivative with initial point to…
saharsa
  • 467
  • 1
  • 7
  • 24
0
votes
1 answer

Create a static or shared library from sycl program using dpc++

I am trying to create a static or shared library from a sycl program and use it from a main application build using gcc/g++/clang++. Everything is fine if I use dpcpp to build my main application, but I need to use g++. For example, my sample…
sriraj
  • 93
  • 5
0
votes
1 answer

How to measure execution time of code in device+OpenCL+GPU

I try to measure the execution time of my code on CPU and GPU. for measuring the time on CPU, I used std::chrono::high_resolution_clock::now() and std::chrono::high_resolution_clock::now(), std::chrono::duration_caststd::chrono::nanoseconds(end -…
saharsa
  • 467
  • 1
  • 7
  • 24