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
24
votes
2 answers

Understanding oneAPI and SYCL in AMD GPU

I am a GPGPU developer and I have done all my work using CUDA. Lately I have acquired an AMD GPU for my home setup and I have been reading about SYCL and oneAPI but I'm not sure I understand what each of those are, how they complement. If I have…
jjcasmar
  • 1,387
  • 1
  • 18
  • 30
6
votes
1 answer

4000% Performance Decrease in SYCL when using Unified Shared Memory instead of Device Memory

In SYCL, there are three types of memory: host memory, device memory, and Unified Shared Memory (USM). For host and device memory, data exchange requires explicit copying. Meanwhile, data movement from and to USM is automatically managed by the SYCL…
比尔盖子
  • 2,693
  • 5
  • 37
  • 53
5
votes
2 answers

Using SYCL 1.2 in MacOS

I want to start using SYCL, but so far I found that one needs to install ComputeCpp and it only supports Ubuntu, CentOS, and Windows. What are the alternatives for using SYCL on MacOS Catalina?
user3116936
  • 492
  • 3
  • 21
3
votes
1 answer

How can i create a customizable functor accepting sycl kernel?

In sycl we create a kernel like this: queue.submit( [&d_cells, &d_count_occupied](sycl::handler& cgh) { auto cells_accessor = d_cells.get_access(cgh); auto count_accessor = …
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
3
votes
1 answer

The command_submit in the sycl::info::event_profiling, submits the whole code or just the parallel-for?

I try to analyze the execution time of my function on device. I read this link: https://docs.oneapi.com/versions/latest/dpcpp/iface/event.html but I did not find in the documentation any information about sycl::info::event_profiling, which let me to…
saharsa
  • 467
  • 1
  • 7
  • 24
3
votes
1 answer

Is it more efficient in SYCL to use one buffer or multiple buffers?

Suppose I have an array of data, for example an array of 3D vectors of size N. Suppose that each iteration of my SYCL kernel is exclusively or primarily concerned with only one vector. Which of the following ways of breaking this into contiguous…
sapphous
  • 37
  • 4
3
votes
2 answers

How to print inside SYCL parallel_for (kernel)?

I'm working on vectorAdd sample application which was provided along with oneAPI basekit. When I tried printing the sum inside kernel, I get the following error. Please find attached source code and error when compiled. //Source code …
3
votes
2 answers

buffers in CCL code samples along with the oneapi toolkit

I Was going through the CCL code samples along with the oneapi toolkit. In the below DPC++(SYCL) code initially sendbuf a buffer is created in the cpu side and is not initialised and in the part where offloading to target device takes place the…
Kannan K
  • 43
  • 4
3
votes
1 answer

What is the optimum OpenCL 2 kernel to sum floats?

C++ 17 introduced a number of new algorithms to support parallel execution, in particular std::reduce is a parallel version of std::accumulate which permits non-deterministic behaviour for non-commutative operations, such as floating point addition.…
kenba
  • 4,303
  • 1
  • 23
  • 40
3
votes
1 answer

Single source C++ programming model?

What is mean by single source c++ programming model.I have recently came to know about SYCL which people describes it as a Single source C++ programming model related to OPENCL. I would highly appreciate the answers which describes what SYCL is ?…
PreeJackie
  • 587
  • 4
  • 14
2
votes
0 answers

How to debug a sycl runtime compilation that fails with segmentation fault

The point of the question I have a minimal program that segfaults during sycl runtime compilation. For the sake of detail i have precise reproduction details below. However, the point of this question is to understand how to debug this. It took me a…
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
2
votes
0 answers

Automatically convert sycl swizzle operation to vector

I have the following line of code in a sycl application under a parallel_for: queue.submit( [&map, &output](cl::sycl::handler& cgh) { auto d_image = output.get_access(cgh); auto…
Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
2
votes
1 answer

How to optimize SYCL kernel

I'm studying SYCL at university and I have a question about performance of a code. In particular I have this C/C++ code: And I need to translate it in a SYCL kernel with parallelization and I do this: #include #include…
user17271389
2
votes
1 answer

Access memory owned by read buffer

According SYCL reference Buffers can be initialized by a host data pointer. While the buffer exists, it owns the host data and direct access of the host data pointer during that time is undefined. Which is understandable for output buffers. But…
pic11
  • 14,267
  • 21
  • 83
  • 119
2
votes
1 answer

sycl/dpc++ accessing global variable using global pointer

I am trying to access a global variable from inside the sycl kernel. A code that uses this pattern and its output is as follows. #include using namespace sycl; int g_var = 22; int * const g_ptr = &g_var; int main() { queue…
sriraj
  • 93
  • 5
1
2 3
9 10