forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework configuration of
CHPL_GPU
to improve clarity (chapel-lang#26072
) Reworks many of our configuration settings around `CHPL_GPU` to improve the clarity improve the user expierence when setting up Chapel for GPUs. Major highlights: - For the most part, if the target gpu compiler is in `PATH`, our scripts will "do the right thing" - Exposes the current CUDA/ROCm version as `CHPL_GPU_SDK_VERSION` - The macro `ROCM_VERSION_MAJOR` is now based on this value - Switches to inferring information like versions and paths to be based on invocations of the target gpu compiler Implementation changes: - Most information is now determined by looking at the ouptut of a test compile of the target gpu compiler, i.e.: `echo ""int main() { return 0; }" | nvcc -v -c -x cu - -o /dev/null &2>&1` - Reworked what `CHPL_ROCM_PATH` means (and remove the sub vars for this, which were confusing). This now always points to the directory such that `CHPL_ROCM_PATH/bin/hipcc` exists. This was the previous definition, but this PR enforces that better improves our logic to infer that - Added `CHPL_ROCM_AMDGCN_PATH` and `CHPL_ROCM_LLVM_PATH`, both of which are based on information gained from actually invoking `hipcc`. This removes many heuristics we had for finding this - Moved compile/link argument detection into `chpl_gpu.py` - The Chapel compiler should now do a much better job of working with spack installs of the target gpu compiler Fixes: - Resolves chapel-lang#23791 - Resolves chapel-lang#25952 - Resolves chapel-lang#22057 - Resolves chapel-lang#23542 - Resolves [Expose cuda/rocm versions](Cray/chapel-private#5508) Testing - ROCm 4 - [x] validated that printchplenv output is correct, with/without `CHPL_ROCM_PATH` - [x] validated proper errors occur when the path is wrong or the target gpu compiler is "broken" - [x] `make check` - ROCm 5 - [x] validated that printchplenv output is correct, with/without `CHPL_ROCM_PATH` - [x] validated proper errors occur when the path is wrong or the target gpu compiler is "broken" - [x] `make check` - ROCm 6 - [x] validated that printchplenv output is correct, with/without `CHPL_ROCM_PATH` - [x] validated proper errors occur when the path is wrong or the target gpu compiler is "broken" - [x] `start_test test/gpu/native` - [x] `make check` with spack installed ROCm 6 - CUDA 11 - [x] validated that printchplenv output is correct, with/without `CHPL_CUDA_PATH` - [x] validated proper errors occur when the path is wrong or the target gpu compiler is "broken" - [x] `make check` - CUDA 12 - [x] validated that printchplenv output is correct, with/without `CHPL_CUDA_PATH` - [x] validated proper errors occur when the path is wrong or the target gpu compiler is "broken" - [x] `start_test test/gpu/native` - Default config (no GPU) - [x] validated that printchplenv output is correct - [x] paratest with/without comm - CHPL_GPU=cpu - [x] validated that printchplenv output is correct - [x] `start_test test/gpu/native` <details> <summary>command to validate paths</summary> ```bash printchplenv --only CHPL_GPU,CHPL_GPU_SDK_VERSION,CHPL_CUDA_PATH,CHPL_CUDA_LIBDEVICE_PATH,CHPL_ROCM_PATH,CHPL_ROCM_LLVM_PATH,CHPL_ROCM_AMDGCN_PATH ``` </details> [Reviewed by @arezaii]
- Loading branch information
Showing
18 changed files
with
314 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.