Skip to content
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

Correct link to CUDA::nvToolsExt of target nvtx #267

Closed
codecircuit opened this issue Nov 6, 2021 · 4 comments
Closed

Correct link to CUDA::nvToolsExt of target nvtx #267

codecircuit opened this issue Nov 6, 2021 · 4 comments

Comments

@codecircuit
Copy link
Contributor

We should link to the CUDA nvtx library here. It is sufficient to change this line to

target_link_libraries(nvtx PRIVATE Threads::Threads CUDA::nvToolsExt)
@eyalroz
Copy link
Owner

eyalroz commented Nov 6, 2021

Well, CUDA::nvToolsExt should be a public dependency, shouldn't it?

And, come to think of it... shouldn't the threads dependency be public too?

eyalroz added a commit that referenced this issue Nov 6, 2021
…library, plus - added a public dependency on `CUDA::nvToolsExt`.
eyalroz added a commit that referenced this issue Nov 6, 2021
…library, plus - added a public dependency on `CUDA::nvToolsExt`.
@codecircuit
Copy link
Contributor Author

It should not be PUBLIC because the header nvtx/profiling.hpp, which defines the INTERFACE of target cuda-api-wrappers::nvtx does not include any header of Threads::Threads or CUDA::nvToolsExt. If a target is linked to cuda-api-wrappers::nvtx the libraries of Threads::Threads and CUDA::nvToolsExt are added at the linking stage, which is sufficient.

@eyalroz
Copy link
Owner

eyalroz commented Nov 7, 2021

. If a target is linked to cuda-api-wrappers::nvtx the libraries of Threads::Threads and CUDA::nvToolsExt are added at the linking stage, which is sufficient.

But for them to be added, shouldn't the dependency be PUBLIC? Otherwise, I'm misinterpreting PRIVATE and PUBLIC.

@codecircuit
Copy link
Contributor Author

This post explains it pretty well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants