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
Sorry for the delayed reply. I am not sure what you (or presumably for new users) are confusing about, could you please elaborate a bit on why that is important. Also, contributions are welcomed.
In Bazel there are now 2 types of libraries, CC and CUDA. However, in a CUDA program, there are 3 types of code: 1) code that runs on the CPU that has nothing to do with GPUs, 2) code that runs on the CPU that sets up and manages the launching of GPU kernels (which needs cuda_runtime.h, and 3) code that runs on the GPU. How do these 3 types of code get mapped to the 2 types of bazel libraries?
You might misunderstanding it a little bit. There is actually 2 languages involved, cuda and cpp, and cuda is a superset of cpp, so
pure cpp
cpp mixed with cuda, but still cuda anyway
pure cuda.
So cc rules should be used to handle cpp language and cuda rules should be used to handle cuda langauge.
For the second point, it is a purely code organization thing. I'd suggest you put the launcher (a cpp function that calls a cuda kernel with <<<>>> configuration) definition in cuda and only expose the declaration to pure cpp.
Can you expand the basic example to have both CC library and CUDA library?
The text was updated successfully, but these errors were encountered: