Skip to content

[WIP]: Add nvtx annotations to cudf-polars shuffle - #22718

Draft
TomAugspurger wants to merge 1 commit into
NVIDIA:mainfrom
TomAugspurger:tom/annotate-shuffles
Draft

[WIP]: Add nvtx annotations to cudf-polars shuffle#22718
TomAugspurger wants to merge 1 commit into
NVIDIA:mainfrom
TomAugspurger:tom/annotate-shuffles

Conversation

@TomAugspurger

@TomAugspurger TomAugspurger commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

This adds nvtx annotations for shuffles in cudf. Note that we don't use nvtx.annotate which is push/pop based on the current thread. This implies some kind of partent-child relationship. But if we have two Shuffle actors, it would be inappropriate to say that the second one to start is a child of the first.

So instead we use nvtx.start_range and nvtx.end_range.

Joins will often involve multiple shuffle (e.g. left and right). We set the nvtx category to the collective_id that uniquely identifies the shuffle

image

Note: I'm using https://gist.github.com/TomAugspurger/cebf449f7621f69ff70a5452f1ca5706 as a small benchmark that forces shuffle-based joins for a cudf-polars query.

This adds nvtx annotations for shuffles in cudf. Note that we don't use
`nvtx.annotate` which is push/pop based on the current thread. This
implies some kind of partent-child relationship. But if we have two
Shuffle actors, it would be inappropriate to say that the second one to
start is a child of the first.

So instead we use `nvtx.start_range` and `nvtx.end_range`.
@copy-pr-bot

copy-pr-bot Bot commented May 29, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels May 29, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 29, 2026
@TomAugspurger TomAugspurger added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jun 22, 2026
@josephine-wolf-oberholtzer josephine-wolf-oberholtzer moved this to In Progress in cuDF Python Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants