Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

Description

closes #3395

Instruments all user-facing functions in cuda.compute with NVTX annotations for Nsight Systems profiling visibility.

Implementation

  • Created _nvtx.py module with @annotate() decorator wrapping nvtx.annotate()
  • Applied decorator to:
    • All algorithm functions: reduce_into, inclusive_scan, exclusive_scan, transforms, histogram, sorts, etc.
    • All make_<algorithm> factory functions
    • All __call__ methods of algorithm classes
    • All iterator factory functions: CountingIterator, ConstantIterator, TransformIterator, etc.
  • Added nvtx dependency to pyproject.toml

Configuration

  • Domain: "cuda.compute"
  • Color: 0x76B900 (NVIDIA green)
  • Message: Function name (automatic)

Example

import cuda.compute as compute

# Now visible in Nsight Systems under "cuda.compute" domain
compute.reduce_into(d_in, d_out, op, num_items, init, stream)

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
Original prompt

This section details on the original issue you should resolve

<issue_title>Add nvtx annotations around all functions in cuda.compute.</issue_title>
<issue_description>The user facing APIs in cuda.compute should be annotated using nvtx, so that they show up in Nsight Systems</issue_description>

<agent_instructions>Use https://nvtx.readthedocs.io/en/latest/index.html, introducing nvtx as a dependency in pyproject.toml. For most use cases, the high-level decorator @nvtx.annotate() should suffice. Use the domain name cuda.compute and use NVIDIA green (76B900) as the color. Be sure to also annotate the user-facing iterator creation functions. Be sure to also annotate the make_<algorithm> functions and their __call__ methods.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Dec 8, 2025

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.

Copilot AI changed the title [WIP] Add nvtx annotations around functions in cuda.compute Add NVTX annotations to cuda.compute user-facing APIs Dec 8, 2025
Copilot AI requested a review from shwina December 8, 2025 13:21
@shwina
Copy link
Contributor

shwina commented Dec 8, 2025

/ok to test 4ad5fe0

@shwina shwina marked this pull request as ready for review December 8, 2025 14:59
@shwina shwina requested a review from a team as a code owner December 8, 2025 14:59
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 8, 2025
@github-actions

This comment has been minimized.

@shwina
Copy link
Contributor

shwina commented Dec 8, 2025

/ok to test e3f280a

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🥳 CI Workflow Results

🟩 Finished in 1h 04m: Pass: 100%/48 | Total: 12h 16m | Max: 41m 52s

See results here.

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Add nvtx annotations around all functions in cuda.compute.

2 participants