- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have been trying to convert a simple matrix multiplication code from CUDA to OneAPI using DPCT. I have converted it using the tool and made the changes to the converted code as per DPCT reference messages.
Upon execution, I get the following error which I couldn't find any documentation on:
"Non-uniform work-groups are not supported by the target device -54 (CL_INVALID_WORK_GROUP_SIZE)Exception caught at file:matrixmulcuda.dp.cpp, line:246"
I am attaching the CUDA code, the converted DPCPP code, and its compiled binary ".o" file.
Steps I followed to compile and run on the devcloud server:
dpcpp matrixmulcuda.dp.cpp -o matrixmulcudanew.o
./matrixmulcudanew.o
Best,
Siddhanta
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Siddhanta,
>>>Non-uniform work-groups are not supported by the target device -54 (CL_INVALID_WORK_GROUP_SIZE)Exception
Work-Group size is specific to the device you can find the details of supported max work-group size and Preferred work group size multiples using clinfo command.
Please try running the code with supported work-group size and do let us know if your issue still persists.
Also, let us know the target device on which you are trying to run the migrated code and error logs along with the output of clinfo command.
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Siddhanta,
Could you please let us know whether your issue is resolved or not? If not please share the above requested details.
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
Thank you for your solution. I was able to resolve that issue.
However, I am receiving a segmentation fault error now. At first, I was getting an error on compilation saying "double type is not supported on this platform" as seen in "screenshot 1". I am building this for Intel Graphics. So I converted all my double types to float.
Doing so I was able to build successfully, however, I am now getting a sigsegv error on execution(screenshot 2). I tried using gdb-oneapi to debug. I introduced a breakpoint at line 1 and it gave me this error at that point itself.
I am attaching my code for your reference.
Steps to replicate the issue:
$ qsub -I -l nodes=1:gpu:ppn=2 -d .
$ dpcpp -g -O0 -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xs "-device kbl -internal_options -cl-kernel-debug-enable -options -cl-opt-disable" code.dp.cpp -o code.o
$ ./code.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on your issue.
Meanwhile, Regarding, "I was getting an error on compilation saying "double type is not supported on this platform"", "So I converted all my double types to float."
Instead of changing all the doubles types to float, could you please try exporting the below two environment variables on DevCloud and then compile and execute the code?
Let us know the output after following the above suggestion. Please do share the error logs.
export OverrideDefaultFP64Settings=1 && export IGC_EnableDPEmulation=1
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
Thank you for your time. Exporting the env variables enabled me to use double in my code.
Also, I was now able to solve the segmentation fault error in the code by debugging it. There is, however, an error when the kernel is called. It throws the following error: "Native API failed. Native API returns: -42 (CL_INVALID_BINARY) -42 (CL_INVALID_BINARY)Exception caught at file:CMT-bone-pca.dp.cpp, line:647". Adding the logs and the source code for your reference.
Best,
Siddhanta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Siddhanta,
>>" I was now able to solve the segmentation fault error in the code by debugging it"
Could you please share the latest code and steps to reproduce the current error you are getting?
We have tried to reproduce the error using the code dpc_code.cpp shared by you in your last post, but we were still getting a "Segmentation fault". Kindly share the updated code so that we can investigate further.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
Unfortunately, it has been giving me segmentation fault error after the first time that I ran it which is very strange.
So currently I am also getting the same error as you have shown in your screenshot.
I can't seem to understand what is causing the issue since I am not getting any specific error even when using gdb-oneapi.
Best,
Siddhanta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Siddhanta,
We are working on your issue, we will get back to you soon.
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can reproduce this issue. I will figure it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Goutham and Chen,
Thank you for your continued support. I was able to find a resolution for the issue. The issue was that the memory was being freed inside the outer loop as opposed to outside it. I am attaching the working code for your reference.
Again, Thank you for your help!
Best,
Siddhanta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Siddhanta,
Thanks for your feedbacks. It's really helpful.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page