Branch: refs/heads/main
Revision: c8769c143f04a93d45476989d5646d2eefe13e9b
Author: e-kayrakli
Link: Add a warning when `gpuClock` is called from the host by e-kayrakli · Pull Request #27022 · chapel-lang/chapel · GitHub
Log Message:
Add a warning when gpuClock
is called from the host (#27022)
Inspired by this discourse
topic.
This PR adds a warning when gpuClock
is called from the host. When
that happens we always return 0 silently. Understandably, that can be
confusing.
There's a question of whether that warning should be suppressable when
the same loop is executed both on the CPU and the GPU, for example.
However, I see gpuClock
as an advanced feature that should not be
widely used. So, this PR doesn't go that far.
[Reviewed by @jabraham17]
Test:
- amd
Diff:
M modules/standard/GPU.chpl
M runtime/include/gpu/chpl-gpu-gen-common.h
A test/gpu/native/basics/gpuClockOnHost.chpl
A test/gpu/native/basics/gpuClockOnHost.good
https://github.com/chapel-lang/chapel/pull/27022.diff