Skip to content

Use cp_async_bulk(space_shared,...) when available - #6362

Merged
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:space_shaerd
Nov 3, 2025
Merged

bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:space_shaerd

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Fixes: #6302

@bernhardmgruber
bernhardmgruber requested review from a team as code owners October 28, 2025 13:57
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Oct 28, 2025
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Oct 28, 2025
@bernhardmgruber bernhardmgruber changed the title Use cp_async_bulk(space_shared,...) when available Use cp_async_bulk(space_shared,...) when available Oct 28, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@bernhardmgruber
bernhardmgruber force-pushed the space_shaerd branch 2 times, most recently from 830344c to 86607b7 Compare October 30, 2025 21:11
&& ::cuda::device::is_address_from(__src, ::cuda::device::address_space::global)) {
::cuda::ptx::cp_async_bulk(
::cuda::ptx::space_cluster,
::cuda::std::conditional_t<__cccl_ptx_isa >= 860, ::cuda::ptx::space_shared, ::cuda::ptx::space_cluster>,

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.

would not be better to use a global constexpr variable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the small duplication is fine for the two occurences here. Also, I would not know where to put the global variable except for a new header and I feel that's overkill for this small branch.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment on lines +795 to +799
#if __cccl_ptx_isa >= 860
::cuda::ptx::space_shared,
#else // __cccl_ptx_isa >= 860
::cuda::ptx::space_cluster,
#endif // __cccl_ptx_isa >= 860

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.

Nitpick: those two should also use the conditional_t

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I considered and thought that the preprocessor might compile faster. But I don't mind. Chaning to conditional_t.

@github-actions

github-actions Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 4h 31m: Pass: 100%/134 | Total: 4d 14h | Max: 4h 05m | Hits: 89%/267149

See results here.

@bernhardmgruber
bernhardmgruber merged commit 5c41a28 into NVIDIA:main Nov 3, 2025
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG]: cuda::memcopy_async{_tx} has inefficient codegen on SM120

4 participants