-
Hello, So I have been working on a project that I want to be able to run in parallel. It's been working nicely with CPU but when I ran it on GPU for the first time I got the following compilation error:
Having been reading around I understand this is to do with linking and a commonish issue with GPU code. Could I get some advice on how to go about adapting my project for GPU? The structure of my project is some objects with .h and .cpp files where some functions then do computations in parallel by starting a sycl queue and storing the results in the object variables. I understand one way could be using the A few pointers would be greatly appreciated! P.S. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The issue is because something in your device code calls
The error means that
// file1.cpp
SYCL_EXTERNAL int f();
int main() {
sycl::queue q;
q.single_task([](){ f(); });
q.wait();
}
// file2.cpp
SYCL_EXTERNAL int f() {
return 2;
}
|
Beta Was this translation helpful? Give feedback.
The issue is because something in your device code calls
strlen()
which is undefined on GPU.The error means that
strlen()
is encountered somewhere in device code. If you don't use it, it might be a bug in Armadillo. Perhaps they try to do something special if they detect CUDA support from the compiler or similar.I would recommend looking at the device code IR to understand where this is coming f…