Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.
419 Discussions

[bug] Unable to assign values to variables allocated by sycl::malloc_device in parallel_for

nahso
Novice
510 Views

Hello,

I am writing a demo to test the dense matrix-matrix multiplication. I allocated a matrix A(5x7), then I pad the matrix to B(16x16), finally I multiplied B * transpose(B).

The issue is that the code at line 44 fails to write sum into output[i*k+j], here is the output log:

3,0:0,180
3,1:0,605
3,2:1030.0001,1030.0001
3,3:1455,1455
3,4:1880.0001,1880.0001
3,5:2305.0001,2305.0001
3,6:2730.0003,2730.0003
4,0:230,230
4,1:780,780
4,2:1330,1330
4,3:1880.0001,1880.0001
4,4:2430.0001,2430.0001
4,5:2980.0003,2980.0003
4,6:3530,3530
5,0:280,280
5,1:955,955
5,2:1630.0001,1630.0001
5,3:2305.0001,2305.0001
5,4:2980.0003,2980.0003
5,5:3655,3655
5,6:4329.9999,4329.9999 // sycl::stream print ends, line 45
30 80 130 180 230 280 330 // line 53, which prints the result of matrix multiplication
80 255 430 605 780 955 1130
0 0 0 0 0 0 0
0 0 1030 1455 1880 2305 2730
230 780 1330 1880 2430 2980 3530
280 955 1630 2305 2980 3655 4330
0 0 0 0 0 0 0

 

Compilation command: dpcpp -g main-test1.cpp

 

Versions:

Hardware: Intel ATS-P GPU

Linux Kernel: 5.10.54-intel-prerelease-5722

Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2022.1.0/linux/bin-llvm
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64

0 Kudos
1 Solution
nahso
Novice
483 Views

It is a logistic error, not the compiler's fault.

View solution in original post

0 Kudos
2 Replies
nahso
Novice
484 Views

It is a logistic error, not the compiler's fault.

0 Kudos
ShivaniK_Intel
Moderator
464 Views

Hi,


Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread is no longer monitored by intel.


Thanks & Regards

Shivani


0 Kudos
Reply