Branch: refs/heads/main
Revision: f7e9db2750c315aea1feab1bacfe23777509f14e
Author: DanilaFe
Link: Ensure bulk transfers work correctly in the presence of sublocales by DanilaFe · Pull Request #25632 · chapel-lang/chapel · GitHub
Log Message:
Ensure bulk transfers work correctly in the presence of sublocales (#25632)
When checking if an on
statement is necessary, simple block transfer
checks if one of the arrays (either destination or source) is on the
current locale. In that case, it can use either get or a put from the
current locale. Otherwise, it switches to the destinaton locale, and
performs a get.
On main
, the logic for determining whether this switching behavior is
necessary is faulty. Specifically, it uses only the locale IDs for
comparison; however, the parent locale and its GPU sublocales all have
the same ID. Thus, when executing on the host, one can mistakenly think
that one is executing on the device, and try to perform a get that way.
This causes a crash.
The solution is to check for equaity on sublocale IDs when they are
present. This commit / PR implements this.
Reviewed by @e-kayrakli -- thanks!
Testing
- GPU testing
- GASNet testing
Diff:
M modules/internal/DefaultRectangular.chpl
A test/gpu/native/remote-to-remote-transfer-from-host.chpl
A test/gpu/native/remote-to-remote-transfer-from-host.good
A test/gpu/native/transfer-to-remote-from-host.chpl
A test/gpu/native/transfer-to-remote-from-host.good
https://github.com/chapel-lang/chapel/pull/25632.diff