copy#
Synchronous element copy src → dst between global, shared, and register
(local) memory. CUDA currently registers eight variants: five explicit
fixed-width variants, ldstmatrix, vec_auto, and fallback. The
vec_auto implementation contains separate global/shared and register paths;
gmem_smem and reg below name those implementation paths, not selectable
dispatch variants.
Variant |
Pair |
Prio |
Lowering |
|---|---|---|---|
|
global ↔ shared/local, or shared ↔ local |
20 |
explicit thread-scope transfer of exactly the named width; optional global-load cache controls |
|
global ↔ shared |
10 |
synthesized |
|
register ↔ shared/global |
10 |
partition induced by the register layout’s thread axes |
register ↔ shared |
10 |
warp-collective |
|
global / shared / local |
0 |
scalar single-thread copy (last resort) |
The detailed pages cover the two vec_auto paths, ldstmatrix, and the
fallback, including accepted input, lowering algorithm, emitted TIRx IR, and
generated CUDA: