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

NVTX should ship CMake package config so that find_package works #113

Open
bdice opened this issue Feb 23, 2025 · 0 comments
Open

NVTX should ship CMake package config so that find_package works #113

bdice opened this issue Feb 23, 2025 · 0 comments

Comments

@bdice
Copy link
Collaborator

bdice commented Feb 23, 2025

Currently it requires a lot of hacks and non-obvious knowledge to use packages of NVTX with CMake, such as nvtx-c on conda-forge, because the library does not ship a proper package config file.

conda-forge/pytorch-cpu-feedstock#357 is a good example of the kind of problem this creates -- the nvtx-c packages contain NVTX headers but they are not findable by the build system. Several packaging experts and maintainers (including me) were unable to point to a correct solution.

Presently, conda packages that want to get NVTX as a dependency must install nvtx-c and tell their build system something like "trust me, it's already on the include path." This also makes it very hard to support CPM-based workflows that try to find the package locally and fetch it from upstream if not found locally (the find-local step always fails).

As a workaround for this problem, RAPIDS repackages NVTX with package exports and other configuration so that it includes the following files:

lib/cmake/nvtx3/nvtx3-config-version.cmake
lib/cmake/nvtx3/nvtx3-config.cmake
lib/cmake/nvtx3/nvtx3-targets.cmake

Currently librmm conda packages vendor nvtx3, but only because I can't make nvtx-c work without additional package configuration.

I think the solution is that we need to ship lib/cmake/nvtx3/nvtx3-config.cmake as a part of the NVTX tarballs published to GitHub, but I would like confirmation from others.

cc: @robertmaynard @KyleFromNVIDIA @vyasr @evanramos-nvidia for awareness

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

No branches or pull requests

1 participant