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++.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
21 views

SYCL q.memcpy() & h.memcpy() & Intel developer cloud problems

I'm using SYCL on Intel Develope Cloud to test Innovative algorithms. My questions: SYCL q.memcpy() & h.memcpy() do not work. It seems that Intel know about it What is the status of this issue? ...
Ami's user avatar
  • 1
-3 votes
0 answers
58 views

Why can't a SYCL kernel capture by reference? [closed]

I am exploring SYCL and CUDA, especially with the new HMM support from Nvidia. It seems that CUDA now is able to support passing references to containers, even those allocated on the stack, rather ...
ryan.walton.256's user avatar
0 votes
0 answers
65 views

SYCL GPU device query - Is the GPU device is discrete or integtated?

I write a SYCL application for which I need to distinguish between GPU discrete devices and GPU integrated devices. Is there any way, directly or indirectly, to know if the GPU device I selected (for ...
Ami's user avatar
  • 1
0 votes
1 answer
59 views

SYCL - Cannot find the origin of memory corruption

I've been writing a ray tracer using SYCL for a few weeks but I'm now facing a memory corruption issue and I really can't find where it's coming from. I'm working on Windows 11 22H2 using the Intel ...
Tom Clabault's user avatar
0 votes
2 answers
57 views

Cmake file for sycl CUDA backend

I am having trouble writing a CMake file to offload SYCL code to the NVIDIA backend. My CMake file currently looks like this cmake_minimum_required(VERSION 3.22.1) set(CMAKE_C_COMPILER /opt/intel/...
peizhao qiu's user avatar
0 votes
1 answer
62 views

Using points in sycl class

Is it possible to copy a class containing pointers to its internal attribute using SYCL and offload it to the graphics card? Basically, I try to reference members to avoid unnecessary memory usage. I ...
peizhao qiu's user avatar
0 votes
1 answer
93 views

Using Classes in SYCL

I am trying to adopt an OOP software design strategy for a SYCL project I was working on. I got my code running in its C++ version, and then I attempted to convert it to SYCL while trying to make the ...
peizhao qiu's user avatar
3 votes
2 answers
117 views

is `const_cast`ing away const on a reference worth it to preserve the api

We have the specific case with the GPU programing paradigm sycl as described in this fix request where we want to use read only access from a buffer. Specifically image the use case like: namespace ...
Fantastic Mr Fox's user avatar
0 votes
0 answers
40 views

Illegal instruction on execution

I'm trying to install hipSYCL on Nvidia GPU, hipSYCL is installed but it is giving illegal instruction error when try to run the syclcc compiler. I tried running syclcc command on CPU and here is its ...
bhuma's user avatar
  • 1
0 votes
0 answers
67 views

How to use kernel_bundle with custom kernels in SYCL?

I'm trying to get a handle on SYCL's kernel_bundle functionality. My target is to use it as a db storage for my AOT precompiled custom kernels. The desirable result is to precompile these kernels into ...
agoraphobi's user avatar
0 votes
2 answers
46 views

How do I Manage a Stateful Data Structure in Local Memory Shared by All Workitems in a OpenCL/SYCL Workgroup

I'm trying to optimize my memory-bound numerical simulation kernel in OpenCL/SYCL using local memory to allow data sharing between workitems, so that I can reduce redundant global memory traffic. When ...
比尔盖子's user avatar
  • 2,655
0 votes
1 answer
43 views

SYCL USM on integrated devices

SYCL USM will work on discrete GPU if-and-only-if the GPU's hardware supports unified virtual address space. What is case regarding integrated GPUs? Can we assume that any integrated GPU supports USM? ...
Ami's user avatar
  • 1
1 vote
1 answer
45 views

Purpose of `use_host_ptr` property in SYCL

What is the point of use_host_ptr property in SYCL? Why will the SYCL runtime not use the memory pointed to by the provided host pointer? https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-...
ggg's user avatar
  • 1,899
0 votes
1 answer
98 views

SYCL - no GPU platform detected in Windows Visual Studio

I want to do workload on Nvidia GPU with SYCL in Windows 10 Pro 21H2 19044.3086. SYCL guide states that CUDA backend in supported on Windows: Build DPC++ toolchain with support for NVIDIA CUDA To ...
Vladislav Kogan's user avatar
7 votes
1 answer
443 views

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 ...
比尔盖子's user avatar
  • 2,655
0 votes
2 answers
45 views

does valgrind support profiling SYCL applications

I'm trying to identify valgrind's support for different Programing languages, I just want to find the valgrind's support for the SYCL applications, if supports how to profile the SYCL Application, If ...
bhuma's user avatar
  • 1
1 vote
3 answers
97 views

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 ...
比尔盖子's user avatar
  • 2,655
0 votes
0 answers
85 views

cannot copy results from device allocated memory to host SYCL unified shared memory

I'm new to SYCL and trying to run very simple vector addition program using ComputeCpp. #include <sycl/sycl.hpp> #include <iostream> class vector_addition; class vector_initialization; ...
Dmytro's user avatar
  • 300
0 votes
0 answers
124 views

SYCL Explicit Data Movement from Image to Host

I'm having trouble trying to figure out how to do explicit data transfer to/from host when using sycl::image. I'm familiar with sycl::handler.copy when using buffers: float* host_ptr; sycl::buffer<...
Biggy Smith's user avatar
0 votes
2 answers
131 views

Compile and dynamically link generated c-code in SYCL

I have "*.c" files generated during runtime with function implementation int foo(int, int): extern "C"{ int foo(int a, int b) { return a + b; } } I want to use these ...
Anon232's user avatar
0 votes
1 answer
247 views

sycl get_devices() return just the CPU while I have an integrated Intel Iris xe and a dedicated nvidia GPU

Currently I am working in a projet using DPC++. I have worked for a while in the Intel DevCloud. I haven't any problem using computing ressources. When I select a gpu, it works as expected. However, ...
MoMellouky's user avatar
0 votes
1 answer
178 views

No kernel named was found. First SYCL app

I'm trying to code my first SYCL app. Just some falling sand. The details aren't important. just if cell has sand and cell beneath is empty move the sand, else bottom left or bottom right or if no ...
Aaron's user avatar
  • 91
0 votes
1 answer
52 views

Cannot allocate more than 256MB in one allocation on my discrete Intel GPU using SYCL/DPC++ on Linux

When trying to allocate more than 256MB in one allocation on a discrete Intel GPU using SYCL/DPC++ on Linux, I get a runtime error and the program exits immediately, despite having significantly more ...
Nigel Overmars's user avatar
0 votes
2 answers
262 views

SYCL dot product code gives wrong results

In the process of learning SYCL/DPC++, I wrote a SYCL GPU-enabled dot product code (full code on GitHub). #include <iostream> #include <sstream> #include <cmath> #include <CL/sycl....
wyphan's user avatar
  • 216
1 vote
1 answer
122 views

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 ...
Limmershin's user avatar
0 votes
1 answer
125 views

Device-wide synchronization in SYCL on NVIDIA GPUs

Context I'm porting a complex CUDA application to SYCL which uses multiple cudaStream to launch the kernels. In addition, it also uses the default Stream in some cases, forcing a device-wide ...
Luigi-Crisci's user avatar
0 votes
0 answers
79 views

PageRank algorithm Runtime Errors on FPGA and GPUs using sycl

I'm having troubles doing experiments on fpga and gpu using sycl. I'm working online with intel devcloud and I get these 2 runtime errors when performing the executables: On FPGA: terminate called ...
AleChiove's user avatar
0 votes
1 answer
239 views

Mix JIT and AOT compilation for sycl devices

I have a program with a variety of kernels. In production these kernels run on a gpu device and require JIT (Just in time) compilation because we use specialisation constants. For testing we run on ...
Fantastic Mr Fox's user avatar
1 vote
1 answer
205 views

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 ...
Louis Child's user avatar
0 votes
1 answer
109 views

Facing error: SYCL kernel cannot call a recursive function

I was running this code using SYCL and this error was coming up regarding recursion "error: SYCL kernel cannot call a recursive function" I am not sure what is causing this error. I used ...
Pksingh's user avatar
  • 53
0 votes
2 answers
276 views

Warnings compiling simple SYCL program with Clang++

When compiling a very simple program with Clang++, vanilla version 16 (not intel version), I get warnings that do not arise when compiling with the dpcpp compiler. I am concerned since I have no way ...
Alejandro Arcila's user avatar
0 votes
1 answer
298 views

SyCL DPC++: are nVidia GPUs supported in DPC++ under Windows?

I'm doing some ComputeCpp Vs DPC++ comparisons on Windows. ComputeCpp is fine to me so far, modulo being forced to use the Professional edition to encode multiple spir/PTX targets. I heard this ...
riccardoventrella's user avatar
1 vote
1 answer
116 views

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 ...
riccardoventrella's user avatar
2 votes
0 answers
254 views

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 ...
Fantastic Mr Fox's user avatar
1 vote
1 answer
282 views

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 ...
Fantastic Mr Fox's user avatar
3 votes
1 answer
256 views

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<sycl::access_mode::read>(cgh); ...
Fantastic Mr Fox's user avatar
1 vote
0 answers
245 views

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); ...
solarlate's user avatar
1 vote
1 answer
343 views

sycl vector types are not marked as device copyable

This line: static_assert( sycl::is_device_copyable<sycl::float3>::value, "The vector types should be copyable." ); Fails with the static assert error for all vector types in ...
Fantastic Mr Fox's user avatar
0 votes
1 answer
254 views

Passing lambda function to a SYCL parallel for region

A SYCL kernel can be submitted to a queue as follows - Queue.submit([=](handler& cgh){ cgh.parallel_for<class test>(_range, [=](nd_item<2> iter{ Write your function (F) ...
Atharva Dubey's user avatar
1 vote
1 answer
207 views

SYCL: Runtime-Error when initialising a queue

When initialising a queue in SYCL with ComputeCpp I get a Runtime-Error using Visual Studio 2022. Also I tried exact the same code used on the Codeplay Guide. I'm able to trigger this error just by ...
Spaghetti's user avatar
0 votes
1 answer
733 views

CL/sycl.hpp not located by VS Code (ubuntu 22.04)

I am starting with SYCL and my code runs well. However in the VS Code editor,#include<CL/sycl.hpp> is showing error squiggles and I need to update the include path to get the auto-suggestions. ...
BoringSession's user avatar
0 votes
0 answers
68 views

Is there an alternative to calloc() in SYCL?

Is there an alternative to the C function calloc() in SYCL? Or the only alternative to imitate the behaviour is to use malloc_host() / malloc_device() and then memset()? I've tested out this last ...
gamersensual's user avatar
0 votes
1 answer
162 views

How to reduce the time cost of parallel_for in DPC++?

I've wrote the following code in DPC++ to test time consumption. // ignore sth for defining subdevices cl::sycl::queue q[4] = {cl::sycl::queue{SubDevices1[0]}, cl::sycl::queue{SubDevices1[1]}, ...
lastans7's user avatar
  • 143
2 votes
0 answers
173 views

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....
Fantastic Mr Fox's user avatar
2 votes
1 answer
158 views

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:...
user avatar
1 vote
1 answer
214 views

Trying to implement 2d array addition. in DPC++

I am learning dpc++ and trying to implement 2d array matrix program. I am stuck in between the program. Please check the blow code and support me. Need help. #include<CL/sycl.hpp> #include<...
BHARATH KUMAR's user avatar
0 votes
0 answers
330 views

gpu_selector is giving runtime error like CL_DEVICE_NOT_FOUND, in sycl dpc++

In my Ubuntu 20.04 version, we have installed intel one API dpc++. The version is; Intel(R) one API DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316) Where we have nvidia gpu. (Got to know by command: ...
BHARATH KUMAR's user avatar
1 vote
1 answer
273 views

SYCL DPC++ auto detect device

This question might be trivial, unfortunately I haven't found the answer I was looking for. I used dpct migration tool to port some cuda code to Intel DPC++ and then I further optimized everything I ...
Elle's user avatar
  • 304
1 vote
0 answers
106 views

port SYCL/DPC++ code originally written for GPUs to FPGAs

I'm kinda new to the world of FPGAs and I'm trying to port some code written for GPUs to FPGAs, to compare the performances. From my understanding, using parallel_for ain't a good practice (in fact it ...
Elle's user avatar
  • 304
1 vote
1 answer
357 views

Is there a way to check the number of CPU threads in use with sycl?

I'm not sure this question is correctly formulated, I'm still learning. I was wondering if there is a way, when I run a sycl program with a cpu_selector to get if I'm using it as single core or multi ...
Elle's user avatar
  • 304