Skip to content

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

Closed

Description

@ahendriksen

Is this a duplicate?

Type of Bug

Performance

Component

libcu++

Describe the bug

cuda::memcpy_async{_tx} emits the cp.async.bulk.shared::cluster.global.mbarrier::complete_tx::bytes instruction. This instruction has inefficient code-gen on SM120. It provides a fallback path when the shared memory pointer points to remote shared memory.

When available, the code should emit the PTX instruction with .shared::cta modifier, which has better codegen on SM120:

cp.async.bulk.shared::cta.global.mbarrier::complete_tx::bytes

How to Reproduce

https://godbolt.org/z/P641vnYM3

Expected behavior

Using .shared::cta as .space has better codegen on sm120:

https://godbolt.org/z/1xx5eP1Ms

Reproduction link

https://godbolt.org/z/P641vnYM3

Operating System

No response

nvidia-smi output

No response

NVCC version

13.0

Activity

  1. bernhardmgruber commented on Oct 21, 2025

    @bernhardmgruber
    Contributor

    I am certain we have this in other places too! I think @pauleonix also noticed this while working on cub::[detail::]BlockLoadToShared

  2. added a commit that references this issue on Oct 28, 2025
    bcc5d28
  3. moved this from Todo to In Review in CCCLon Oct 28, 2025
  4. added 4 commits that reference this issue on Oct 30, 2025
    b1ae110
    bc88941
    5f3e5e0
    1f5bed1
  5. added a commit that references this issue on Nov 3, 2025
    5c41a28
  6. moved this from In Review to Done in CCCLon Nov 3, 2025
  7. added 2 commits that reference this issue on Jan 7, 2026
    7c40318
    e5614b9
  8. added theissue type on Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions