Skip to content

[WIP] GPU placement for scopes: ExternalCall scopes offloaded inside the call - #91

Merged
ThrudPrimrose merged 4 commits into
mainfrom
feat/gpu-scopes
Nov 13, 2026
Merged

ThrudPrimrose merged 4 commits into
mainfrom
feat/gpu-scopes

Conversation

@ThrudPrimrose

Copy link
Copy Markdown
Collaborator

An agent places each ExternalCall scope on the CPU or GPU (place), a GPU scope's body is lowered by DaCe's OffloadToAccelerator inside the call, and insert_copies moves the host/device copies to the scope boundaries in the program. Stage-2 moves now run inside a scope (list_moves/apply_move with scope=), plus a GPU-only stage-loads-shared move over DaCe's StageLoadsThroughSharedMemory, which needs the DaCe pin bumped to c08937df26 or later.

@ThrudPrimrose
ThrudPrimrose force-pushed the feat/gpu-scopes branch 4 times, most recently from 3c085b7 to 03c2d02 Compare November 12, 2026 07:05
…xternalCall, copies are an agent operation, and moves run inside a scope

place(devices) only chooses each kernel's device and runs DaCe's OffloadToAccelerator inside each GPU kernel's body; insert_copies() offloads the program so copies sit at the kernels' boundaries; list_moves/apply_move take scope=<kernel>; stage-loads-shared calls DaCe's StageLoadsThroughSharedMemory (needs the DaCe pin bump to c08937df26 or later).
… every scope stay on the host when copies are inserted; program moves carry no scope

The block reaches StageLoadsThroughSharedMemory, so no kernel falls back to the configured default; a call without one is refused and says what to pass. OffloadKernels pins the program's top-level maps to the host, so only a scope placed on the GPU runs there. list_moves sets scope only inside a kernel, so a program move goes back to apply_move as listed.
…h a nested SDFG at the top of a state

Canonicalization, every move and the scopes inline top-level nested SDFGs, and the default scopes outline what is
left (qe_vexx_k keeps two behind a view until then): after scopes, 15 of 15 bench kernels checked hold none, so
OffloadKernels only ever sees the program's own maps.
@ThrudPrimrose
ThrudPrimrose merged commit f72e1f6 into main Nov 13, 2026
3 of 6 checks passed
@ThrudPrimrose
ThrudPrimrose deleted the feat/gpu-scopes branch November 13, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant