You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CUDA function "cudaGetErrorString", which converts a CUDA error code onto a user-readable error string, is incorrectly translated by syclomatic when used as parameter on a macro. Syclomatic translates the name of the function with a string, but the expectation is to keep the function name at that point so that it can be used in nested macros.
#include<sycl/sycl.hpp>
#include<dpct/dpct.hpp>
#include<cstdio>
#defineCHECK_CUDA_FUNCTION(errNo, errFunc) \
errFunc(errNo)
#defineCHECK_CUDA(errNo) CHECK_CUDA_FUNCTION(errNo, "<Placeholder string>")
intmain() {
/* DPCT1009:0: SYCL uses exceptions to report errors and does not use the error codes. The call was replaced by a placeholder string. You need to rewrite this code.*/printf("%s \n", CHECK_CUDA(0));
};
Environment
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
@Ruyk
We will introduce a new helper function to map cudaGetErrorString, and implement the migration logic in SYCLomatic. @intwanghao will implement this PR later on.
Describe the bug
The CUDA function "cudaGetErrorString", which converts a CUDA error code onto a user-readable error string, is incorrectly translated by syclomatic when used as parameter on a macro. Syclomatic translates the name of the function with a string, but the expectation is to keep the function name at that point so that it can be used in nested macros.
To reproduce
The code below:
is incorrectly converted to
Environment
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: