[Chapel Merge] Fix 2 GPU tests that rely on specifics of the CUDA API

Branch: refs/heads/main
Revision: 39c7ff2ca2dd3c880630fd9f55b3bfcd8acc99ca
Author: jabraham17
Link: Fix 2 GPU tests that rely on specifics of the CUDA API by jabraham17 · Pull Request #29080 · chapel-lang/chapel · GitHub
Log Message:
Fix 2 GPU tests that rely on specifics of the CUDA API (#29080)

Fixes 2 GPU tests that rely on the specific of the CUDA API to work with
CUDA 13

  • gpuAddNums.chpl is a low-level mock implemention of how the Chapel
    runtime works, and needs to use a new API with CUDA 13
  • mathKernels.chpl builds cuda code manually with clang and relies on
    certain compiler flags to be passed. Where these paths are got more
    complicated in CUDA 13, so has been adjusted to share logic with
    printchplenv

[Reviewed by @benharsh]

Compare: Comparing e40381d54ec79a4848876e71ab7a948014ef1b72...cddd354529d1979e5970830cf9e5e9c440e845c2 · chapel-lang/chapel · GitHub

Diff:
M test/gpu/native/cudaOnly/gpuAddNums/gpuAddNums.chpl
M test/gpu/native/studies/math/mathKernels.precomp
https://github.com/chapel-lang/chapel/pull/29080.diff