-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support implementation_deps on cuda_object and cuda_library and (transitive) rdc #164
Comments
Great idea. And after careful thinking about In rdc case, objects propagation for dlink follows the table, and in non-rdc case, objects does not propagate
NOTE: co for cuda_objects, cl for cuda_library Footnotes |
I didn't put together an issue yet. But I was also noticing that library dependencies set on cuda_objects don't get linked in. For our unit testing framework catch2, I had to add the dependencies again to our cc_test target even though they're already specified on the cuda_object in order to get linking for the tests to work: |
That is because cuda_objects only provides a CcInfo with only compilation_context, but no linking context. As the original design, cuda_objects is just compilation actions, whose actifacts are to be fed into a cuda_library for final dlink. Move it to |
I don't think that scales well to larger projects with external dependencies. In our case, nearly everything in our project is a cuda_object and we only combine it into a cuda_library at the end when we're linking the shared library: It works ok right now, as we don't have many external dependencies. But if we did start using external library, we'd have to keep track of everything used and add them as dependencies to the final cuda_library -- that could start to become a maintenance burden. Is there any reason why the cuda_objects can't carry linking dependencies? |
It is not "can't" per se, it is just not implemented.
I am not worried about this. The reason for cuda_objects all over around in your repo is because cuda_library does not work for shared library linking. once we fix them, you should be able to dlink multiple times. But we can impl it anyway. |
Another problem arised when it comes to transitive rdc (allow cuda_library to consume cuda_library and propagate the rdc objects). Previously, it was pretty simple and |
implementation_deps are an option with cc_library and allow you to add deps that don't propagage
https://bazel.build/reference/be/c-cpp#cc_library.implementation_deps
The text was updated successfully, but these errors were encountered: