Skip to content

MVP for disabling nvtx ranges for thrust::seq - #6415

Merged
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
gonidelis:nvtx_host
Nov 16, 2025
Merged

bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
gonidelis:nvtx_host

Conversation

@gonidelis

@gonidelis gonidelis commented Oct 31, 2025 •

Copy link
Copy Markdown
Member

fixes #6298

by disabling NVTX ranges for thrust::seq. This PR specifically tracks the thrust algorithms involved in host_vector::push_back() operations and disables NVTX ranges just for these.

The disabling basically evaluates at compile time whether the policy passed to the thrust algorithm (and subsequently to should_enable_nvtx_for_policy()) is thrust::seq or any derivatives using CRTP.

Upon approval of the utility provided here, I will add all the remaining thrust algorithms.

I did isolate and run profiles on the cudf code that pointed to the problem and after the changes I got zero nvtx ranges for these lines in the profile.

@gonidelis
gonidelis requested a review from a team as a code owner October 31, 2025 00:19
@gonidelis
gonidelis requested a review from elstehle October 31, 2025 00:19
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Oct 31, 2025
@copy-pr-bot

copy-pr-bot Bot commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Oct 31, 2025
Comment thread thrust/thrust/detail/nvtx_policy.h Resolved
Comment thread thrust/thrust/detail/nvtx_policy.h Resolved
Comment thread thrust/thrust/detail/nvtx_policy.h Resolved
Comment thread thrust/thrust/detail/copy.inl Resolved

@bernhardmgruber bernhardmgruber 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.

Please fix the remaining two comments, otherwise LGTM.

Comment thread thrust/thrust/detail/copy.inl Resolved
Comment thread thrust/thrust/detail/copy.inl Resolved
Comment thread thrust/thrust/detail/nvtx_policy.h Resolved
@gonidelis

gonidelis commented Nov 5, 2025 •

Copy link
Copy Markdown
Member Author

@bernhardmgruber @miscco now that I am thinking. Is a test expected for these facilities? And should it be under libcu++ better of maybe? Could be in libcudacxx/include/cuda/__nvtx/nvtx.h 👀

@bernhardmgruber

Copy link
Copy Markdown
Contributor

@bernhardmgruber @miscco now that I am thinking. Is a test expected for these facilities?

Good point! Please add a test if you come up with a good idea on how to test it.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@bernhardmgruber
bernhardmgruber enabled auto-merge (squash) November 15, 2025 23:16
@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2d 05h: Pass: 100%/70 | Total: 3d 04h | Max: 3h 17m | Hits: 50%/115311

See results here.

@bernhardmgruber
bernhardmgruber merged commit 99976dc into NVIDIA:main Nov 16, 2025
160 of 163 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Nov 16, 2025
Naraenda pushed a commit to ROCm/rocm-libraries that referenced this pull request Oct 26, 2026
…s for `thrust::seq` (NVIDIA/cccl#6415)

Upstream: NVIDIA/cccl@99976dc

HIP counterpart (system/hip): none. N/A: adds nvtx_policy.h and _CCCL_NVTX_RANGE_SCOPE_IF to algorithm entry points to skip NVTX for thrust::seq; rocThrust carries no NVTX ranges in generic entry points (kept ours, nvtx_policy.h not added). test/ counterpart: none. Not compiled, tests not run (per human)

Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda pushed a commit to ROCm/rocm-libraries that referenced this pull request Oct 29, 2026
…s for `thrust::seq` (NVIDIA/cccl#6415)

Upstream: NVIDIA/cccl@99976dc

HIP counterpart (system/hip): none. N/A: adds nvtx_policy.h and _CCCL_NVTX_RANGE_SCOPE_IF to algorithm entry points to skip NVTX for thrust::seq; rocThrust carries no NVTX ranges in generic entry points (kept ours, nvtx_policy.h not added). test/ counterpart: none. Not compiled, tests not run (per human)

Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda pushed a commit to ROCm/rocm-libraries that referenced this pull request Oct 29, 2026
…s for `thrust::seq` (NVIDIA/cccl#6415)

Upstream: NVIDIA/cccl@99976dc

HIP counterpart (system/hip): none. N/A: adds nvtx_policy.h and _CCCL_NVTX_RANGE_SCOPE_IF to algorithm entry points to skip NVTX for thrust::seq; rocThrust carries no NVTX ranges in generic entry points (kept ours, nvtx_policy.h not added). test/ counterpart: none. Not compiled, tests not run (per human)

Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda pushed a commit to ROCm/rocm-libraries that referenced this pull request Oct 30, 2026
…s for `thrust::seq` (NVIDIA/cccl#6415)

Upstream: NVIDIA/cccl@99976dc

HIP counterpart (system/hip): none. N/A: adds nvtx_policy.h and _CCCL_NVTX_RANGE_SCOPE_IF to algorithm entry points to skip NVTX for thrust::seq; rocThrust carries no NVTX ranges in generic entry points (kept ours, nvtx_policy.h not added). test/ counterpart: none. Not compiled, tests not run (per human)

Co-Authored-By: Claude <noreply@anthropic.com>
Beanavil pushed a commit to ROCm/rocm-libraries that referenced this pull request Oct 30, 2026
…s for `thrust::seq` (NVIDIA/cccl#6415)

Upstream: NVIDIA/cccl@99976dc

HIP counterpart (system/hip): none. N/A: adds nvtx_policy.h and _CCCL_NVTX_RANGE_SCOPE_IF to algorithm entry points to skip NVTX for thrust::seq; rocThrust carries no NVTX ranges in generic entry points (kept ours, nvtx_policy.h not added). test/ counterpart: none. Not compiled, tests not run (per human)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[FEA]: Disable NVTX ranges by default for thrust::seq Thrust algorithms

2 participants