Skip to content

[Backport to 3.4] Align tile state for warpspeed scan#9781

Merged
wmaxey merged 5 commits into
NVIDIA:branch/3.4.xfrom
bernhardmgruber:fix_temp_storage
Jul 11, 2026
Merged

[Backport to 3.4] Align tile state for warpspeed scan#9781
wmaxey merged 5 commits into
NVIDIA:branch/3.4.xfrom
bernhardmgruber:fix_temp_storage

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

This is a manually crafted fix for #9742 for 3.4, since we cannot merge it to main and backport it, because it would conflict with #9565 which solved the same issue as a drive-by.

This PR also backports the test extensions from #9746

@bernhardmgruber bernhardmgruber requested a review from a team as a code owner July 10, 2026 08:27
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 10, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved scan operations’ handling of temporary storage, including cases where the storage address is not naturally aligned.
    • Enhanced reliability when allocating and using temporary storage for lookahead processing.
  • Tests

    • Added coverage for temporary-storage pointers with small address offsets to help detect alignment-related issues.

Walkthrough

Changes

Warpspeed scan now aliases dedicated lookahead tile-state storage and passes it to both kernels. The host launch helper can provide temporary storage with a zero- or one-byte offset.

Warpspeed scan storage

Layer / File(s) Summary
Lookahead storage wiring
cub/cub/device/dispatch/dispatch_scan.cuh
Warpspeed scan derives dedicated lookahead tile-state storage, removes the alignment assertion, and passes the derived pointer to initialization and scan kernels.
Offset pointer testing
cub/test/catch2_test_launch_helper.h
The host launch helper allocates extra storage and invokes actions with a randomly shifted temporary-storage pointer.

Possibly related PRs

  • NVIDIA/cccl#9565: Updates the same warpspeed scan lookahead storage partitioning and kernel argument flow.

Suggested reviewers: robertmaynard, ericniebler, fbusato, srinivasyadav18, gonidelis


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0da0c638-0792-482f-8dd9-4e4341e92698

📥 Commits

Reviewing files that changed from the base of the PR and between a5630ac and 0912772.

📒 Files selected for processing (2)
  • cub/cub/device/dispatch/dispatch_scan.cuh
  • cub/test/catch2_test_launch_helper.h

Comment thread cub/cub/device/dispatch/dispatch_scan.cuh Outdated
Comment thread cub/cub/device/dispatch/dispatch_scan.cuh Outdated
@github-actions

This comment has been minimized.

@bernhardmgruber

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 24m: Pass: 100%/283 | Total: 10d 16h | Max: 2h 23m | Hits: 20%/931706

See results here.

@wmaxey wmaxey merged commit 49f6de6 into NVIDIA:branch/3.4.x Jul 11, 2026
299 of 303 checks passed
@bernhardmgruber bernhardmgruber deleted the fix_temp_storage branch July 13, 2026 07:00
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.

3 participants