Example code for SYCL generic BLAS and portFFT backends
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 22/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- documentation
Direzione di ricerca
The request is for sample programs for the SYCL generic BLAS and portFFT backends, and the reporter's gemm snippet shows the call shape to start from. Pull request #752 is already open against this issue, so read it first to see what examples it covers before writing anything. Done would be a compiling example per backend that the maintainers accept, and it is not yet clear whether they want examples in the repository or in the packaging docs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello! I am in the process of creating debian (.deb) packages for oneMath to be included in Ubuntu. I have the DPC++ (open source version) compiler already packaged and also have the SYCL-only backends for oneMath (v0.9) packaged (built with the DPC++ compiler from my own packages).
I looked around for some code samples for testing these two backend libraries but without much luck. Would you be able to suggest some basic examples that I could use for validating the packaging work?
I asked ChatGPT to help and eventually I got the following to compile:
#include <sycl/sycl.hpp>
#include <oneapi/math.hpp>
#include <oneapi/math/blas.hpp>
int main() {
sycl::queue q{sycl::default_selector_v};
const int M = 2, N = 2, K = 2;
std::vector<float> A = {1,2,3,4};
std::vector<float> B = {5,6,7,8};
std::vector<float> C(4, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
{
sycl::buffer<float> bufA(A.data(), A.size());
sycl::buffer<float> bufB(B.data(), B.size());
sycl::buffer<float> bufC(C.data(), C.size());
oneapi::math::blas::column_major::gemm(
q,
oneapi::math::transpose::nontrans,
oneapi::math::transpose::nontrans,
M, N, K,
alpha,
bufA, K,
bufB, N,
beta,
bufC, N
);
}
std::cout << "C = \n";
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
std::cout << C[i*N + j] << " ";
}
std::cout << "\n";
}
}
This compiled with:
$ clang++-dpcpp -fsycl test_onemath.cpp -lonemath -lonemath_blas_generic
However, when I attempt to run this program on an Intel(R) Arc(TM) B580 Graphics card the program hangs and eventually I kill it with Control+C and get the following output:
$ ./a.out
^CThe program was built for 1 devices
Build program log for 'Intel(R) Arc(TM) B580 Graphics':
IGC: Internal Compiler Error: Interrupt request sent to the program
C =
0 0
0 0
Any ideas? Is this a limitation of the SYCL-only libraries? Or the hardware I'm on. I'll paste other relevant details below in case they're helpful. Thanks for any light you can shed!
$ sycl-ls
[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) B580 Graphics 20.1.0 [1.6.34666]
[opencl:gpu][opencl:0] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) B580 Graphics OpenCL 3.0 NEO [25.31.034666]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Resolute Raccoon (development branch)
Release: 26.04
Codename: resolute
$ apt list --installed | grep -E 'intel|opencl|ocl|igc|libze'
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
intel-microcode/resolute,now 3.20250812.1ubuntu1 amd64 [installed,automatic]
intel-ocloc-dev/resolute,now 25.31.34666.3-1ubuntu1 amd64 [installed]
intel-ocloc-legacy/resolute,now 24.35.30872.40-1 amd64 [installed,automatic]
intel-ocloc/resolute,now 25.31.34666.3-1ubuntu1 amd64 [installed]
intel-opencl-icd-legacy/resolute,now 24.35.30872.40-1 amd64 [installed,automatic]
intel-opencl-icd/resolute,now 25.31.34666.3-1ubuntu1 amd64 [installed,automatic]
libdrm-intel1/resolute,now 2.4.127-1ubuntu1 amd64 [installed,automatic]
libigc1/resolute,now 1.0.17791.18-1 amd64 [installed,automatic]
libigc2/resolute,now 2.16.0-2ubuntu1 amd64 [installed,automatic]
libopencl-clang14/resolute,now 14.0.2-3 amd64 [installed,automatic]
libur-adapter-opencl-dev/resolute,now 6.2.0-0ubuntu1~26.04~ppa5 amd64 [installed]
libur-adapter-opencl0/resolute,now 6.2.0-0ubuntu1~26.04~ppa5 amd64 [installed]
libze-intel-gpu-legacy1-1/resolute,now 24.35.30872.40-1 amd64 [installed,automatic]
libze-intel-gpu1/resolute,now 25.31.34666.3-1ubuntu1 amd64 [installed,automatic]
libze1/resolute,now 1.24.1-2 amd64 [installed,automatic]
ocl-icd-libopencl1/resolute,now 2.3.4-1 amd64 [installed,automatic]
ocl-icd-opencl-dev/resolute,now 2.3.4-1 amd64 [installed]
opencl-c-headers/resolute,now 3.0~2025.07.22-2 all [installed,automatic]
opencl-clhpp-headers/resolute,now 3.0~2025.07.22-1ubuntu1 all [installed,automatic]
$ lscpu | head
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 42 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: GenuineIntel
Model name: 13th Gen Intel(R) Core(TM) i9-13900K
CPU family: 6
Model: 183
Note that it seems recent versions of OpenCL dropped support for Gen 13 (raptor lake), hence why I don't see any CPUs show up with sycl-ls.
- Lingua principale
- C++
- Stelle
- 777
- Fork
- 183
- Merge medio
- 2g 16h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uxlfoundation/oneMath
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 39/100
uxlfoundation/oneMath#795 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
uxlfoundation/oneMath#789 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
uxlfoundation/oneMath#786 ·
I maintainer di solito rispondono entro 1 giorno
-
[DFT][rocFFT] Add regression tests for stride validation and rank handlingForse già presa @zjin-lcf l’ha presa 56 giorni fa. Aperta
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
uxlfoundation/oneMath#771 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
uxlfoundation/oneMath#711 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di uxlfoundation/oneMath
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
patrick-hudson/put.gd-desktop#2044 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
uxlfoundation/oneDNN#6604 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni