Skip to content

Allow enabling NVTX markers by downstream projects after install#610

Merged
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-22.06from
achirkin:enh-allow-nvtx-after-install
May 10, 2022
Merged

Allow enabling NVTX markers by downstream projects after install#610
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-22.06from
achirkin:enh-allow-nvtx-after-install

Conversation

@achirkin

@achirkin achirkin commented Apr 6, 2022

Copy link
Copy Markdown
Contributor

Allow downstream projects enable NVTX option for the raft::raft target, if it hasn't been enabled at the install time.

@achirkin achirkin requested a review from a team as a code owner April 6, 2022 08:47
@achirkin achirkin added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change 3 - Ready for Review and removed cpp CMake labels Apr 6, 2022
@achirkin

achirkin commented Apr 6, 2022

Copy link
Copy Markdown
Contributor Author

This PR should replace rapidsai/cuml#4684 . Tagging @robertmaynard @vinaydes @cjnolet to continue the discussion, please let me know what you think of it.

Note specifically, if NVTX is enabled at the install time, there is no way to turn it off in this proposal.

@vinaydes

vinaydes commented Apr 6, 2022

Copy link
Copy Markdown
Member

Looks good to me. I'll close my PR if we decide to merge this one.

@teju85

teju85 commented Apr 7, 2022

Copy link
Copy Markdown
Contributor

Just curious, why not just enable nvtx markers all the time?

@cjnolet cjnolet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM but would like @robertmaynard’s thoughts before merging

Comment thread cpp/CMakeLists.txt Outdated
Comment thread cpp/CMakeLists.txt Outdated
@achirkin achirkin requested a review from a team as a code owner May 2, 2022 07:55
@achirkin achirkin added breaking Breaking change and removed non-breaking Non-breaking change labels May 2, 2022
@achirkin

achirkin commented May 2, 2022

Copy link
Copy Markdown
Contributor Author

Update, as per prior suggestions:

Comment thread build.sh Outdated
@cjnolet

cjnolet commented May 2, 2022

Copy link
Copy Markdown
Contributor

@achirkin the PR looks good. I think there's still a compilation error showing up in the CI logs:

04:31:43 /workspace/cpp/include/raft/common/detail/nvtx.hpp(153): error: expression must have a constant value
04:31:43 /workspace/cpp/include/raft/common/detail/nvtx.hpp(153): note: cannot call non-constexpr function "raft::common::nvtx::detail::nvtxDomainCreateA"
04:31:43 /usr/local/cuda/include/nvToolsExt.h(1502): here
04:31:43           detected during:
04:31:43             instantiation of class "raft::common::nvtx::detail::domain_store<Domain, std::enable_if_t<std::is_same<const char *, std::decay<decltype(Domain::name)>::type>::value, Domain>> [with Domain=raft::common::nvtx::domain::app]" 
04:31:43 (166): here
04:31:43             instantiation of "void raft::common::nvtx::detail::push_range_name<Domain>(const char *) [with Domain=raft::common::nvtx::domain::app]" 
04:31:43 (177): here
04:31:43             instantiation of "void raft::common::nvtx::detail::push_range<Domain,Args...>(const char *, Args...) [with Domain=raft::common::nvtx::domain::app, Args=<const char *, const char *>]" 
04:31:43 /workspace/cpp/include/raft/core/nvtx.hpp(98): here
04:31:43             instantiation of "void raft::common::nvtx::push_range(const char *, Args...) [with Domain=raft::common::nvtx::domain::app, Args=<const char *, const char *>]" 
04:31:43 /workspace/cpp/include/raft/core/nvtx.hpp(141): here
04:31:43             instantiation of "raft::common::nvtx::range<Domain>::range(const char *, Args...) [with Domain=raft::common::nvtx::domain::app, Args=<const char *, const char *>]" 
04:31:43 /workspace/cpp/test/distance/distance_base.cuh(427): here
04:31:43             instantiation of "void raft::distance::DistanceTest<distanceType, DataType>::SetUp() [with distanceType=raft::distance::CorrelationExpanded, DataType=float]" 
04:31:43 
04:31:43 1 error detected in the compilation of "/workspace/cpp/test/distance/dist_correlation.cu".

@ajschmidt8 ajschmidt8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving ops-codeowner file changes

@achirkin

achirkin commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

Apparently, the NVTX implementation was bugged for cuda <= 11.2 because of the usage of nvtxDomainCreateA as an initializer of a static const pointer. Should work properly now!

@achirkin

achirkin commented May 5, 2022

Copy link
Copy Markdown
Contributor Author

rerun tests

2 similar comments
@achirkin

achirkin commented May 6, 2022

Copy link
Copy Markdown
Contributor Author

rerun tests

@cjnolet

cjnolet commented May 6, 2022

Copy link
Copy Markdown
Contributor

rerun tests

@cjnolet

cjnolet commented May 10, 2022

Copy link
Copy Markdown
Contributor

@gpucibot merge

@rapids-bot rapids-bot Bot merged commit 3a431f1 into NVIDIA:branch-22.06 May 10, 2022
@achirkin achirkin deleted the enh-allow-nvtx-after-install branch May 10, 2022 13:01
rapids-bot Bot pushed a commit to rapidsai/cuml that referenced this pull request May 12, 2022
Adjust the name of the option according to the changes proposed in NVIDIA/raft#610

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #4718
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
Adjust the name of the option according to the changes proposed in NVIDIA/raft#610

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4718
loulankxh pushed a commit to loulankxh/raft that referenced this pull request Oct 14, 2025
…DIA#610)

Allow downstream projects enable `NVTX` option for the `raft::raft` target, if it hasn't been enabled at the install time.

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)
  - Robert Maynard (https://github.com/robertmaynard)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: NVIDIA#610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review breaking Breaking change CMake cpp improvement Improvement / enhancement to an existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants