-
Notifications
You must be signed in to change notification settings - Fork 60
Description
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