Community
cancel
Showing results for 
Search instead for 
Did you mean: 
182 Views

Non-uniform work-groups are not supported by the target device

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

0 Kudos
6 Replies
GouthamK_Intel
Moderator
165 Views

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


GouthamK_Intel
Moderator
137 Views

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


114 Views

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

GouthamK_Intel
Moderator
108 Views

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



104 Views

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

GouthamK_Intel
Moderator
90 Views

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.

GouthamK_Intel_0-1614157727884.png

 

Thanks & Regards

Goutham