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
>>>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.
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
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
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.
>>" 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