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
1
vote
1 answer

Segmentation Fault in a SYCL Kernel

I have been trying to implement naive matrix multiplication in SYCL, but I always keep running into segmentation fault once the kernel start. My code is as follows - class naive_MatMul_kernel; class sharedMatrixMultiplication_kernel; typedef…
Atharva Dubey
  • 832
  • 1
  • 8
  • 25
1
vote
2 answers

ERROR: SYCL kernel cannot call through a function pointer, DPCPP, TBB

I try to define an array of functions and pass to the map, which I defined as a class, then if my device is CPU, the execution of each of my functions over the vector goes through the CPU, if not, goes through the SYCL part and execute on GPU. At…
saharsa
  • 467
  • 1
  • 7
  • 24
1
vote
1 answer

register usage on nvidia with hipSYCL / llvm

I am looking at the performance of a sycl port of some hpc code, which I am running on a GV100 card via hipSYCL. Running the code through a profiler tells me that very high register usage is the likely limiting factor for performance. Is there any…
Flatso
  • 13
  • 3
1
vote
0 answers

failed to allocate memory via malloc_device when using SYCL USM

I am writing neural network using SYCL, but I am confused about malloc_device in SYCL. template class Linear { private: T* weight; T* input; T* result; T* bias; T* dz; const int M; …
1
vote
1 answer

What's the difference between queue.wait() and waiting on a buffer to destruct

Consider this example where I wait for completion with gpuQueue.wait(): constexpr unsigned dataSize = 1024; std::vector in1 (dataSize, 0); std::iota(in1.begin(), in1.end(), 0 ); std::vector in2 (dataSize, 0);…
iwans
  • 445
  • 3
  • 13
1
vote
2 answers

Estimating the optimal tiling size for GPU matrix computations

I've written a Matrix Multiplication Kernel in SYCL, based on Tiling sub-matrices to local cache. The performance uplift I get with tiling (tile size 16x16) and without tiling (naive) approach is up to 2x. For lower tile sizes, I get near to naive…
Karan Shah
  • 417
  • 6
  • 21
1
vote
1 answer

Is it required to build LLVM in order to build hipSYCL?

I'm running Centos 7 and am trying to build hipSYCL (see here) The issue is that hipSYCL needs to have cmake info from the LLVM build (via the LLVM_DIR cmake variable). This is problematic for me because building LLVM requires a massive 35Gb for the…
Aaron B.
  • 1,605
  • 13
  • 12
1
vote
2 answers

Matrix Multiplication on SYCL using 2D std::vector

I'm new to SYCL and C++. This is my kernel for simple matrix multiplication using 2D std::vector. void MatrixMulParallel(queue& q, const std::vector>& a_host, const std::vector>& b_host, …
Karan Shah
  • 417
  • 6
  • 21
1
vote
1 answer

SYCL spec 1.2.1 (rev 7) section 4.8.9.3 error?

Based on the code in,SYCL 1.2.1 spec (rev 7) section 4.8.9.3 I wrote the following: #include namespace sycl = cl::sycl; const int Nproc = 8; int main(int argc, char *argv[]) { int x[Nproc]; sycl::device dev =…
justapony
  • 129
  • 8
1
vote
2 answers

How to invoke the template function in a loop manner?

This question is mostly about the design approach, and I would like to know how to solve such kind of problems in the modern C++ language. I have a library function that defined like (this is a real code from the compiler): template
syscreat
  • 553
  • 1
  • 7
  • 16
1
vote
1 answer

Having trouble creating data buffers for custom objects oneAPI

I am new to oneAPI and similar frameworks, so I am having trouble with data management using SYCL data buffers. My task is to find substrings in a given string using Aho-Corasick algorithm. My Idea was to build a trie and after that submit a…
1
vote
1 answer

Incorrect results when runnig SYCL code. while trying to parallize loop

I'm new to this parallel programming field. I'm trying to parallelize below serial code in SYCL. But when I try to run the code, I'm getting incorrect results. Please find the serial code, SYCL code and output screenshot below. Please help me with…
1
vote
1 answer

How do you make SYCL "default_selector" select an Intel GPU rather than an NVIDIA GPU?

I am currently working on a project using SYCL to apply an unsharp mask to an image. My machine has an NVIDIA and an Intel GPU inside it. I am starting with the following code: default_selector deviceSelector; queue myQueue(deviceSelector); The…
Kyle_Pearce
  • 111
  • 1
  • 8
1
vote
2 answers

SYCL buffers within buffers

Say I have the following structure containing buffers: struct SomeAllocatorCode { int* rawData; size_t rawDataSize; cl::sycl::buffer nestedBuffer; SomeAllocatorCode(int* rawData, size_t size): rawData(rawData), …
user1832287
  • 329
  • 3
  • 11
1
vote
3 answers

HipSYCL for windows

I have just started reading about hipSYCL an implementation of SYCL but there is not much info on it. So my question is does hipsycl supports windows? and also does it support all modern Intel GPUs? Thanks for help I have read github readme and few…
ZSA
  • 85
  • 1
  • 13