diff --git a/toolshed/conda_create_for_pathfinder_testing.ps1 b/toolshed/conda_create_for_pathfinder_testing.ps1 index 115720f6e5e..fbdbb5a0362 100644 --- a/toolshed/conda_create_for_pathfinder_testing.ps1 +++ b/toolshed/conda_create_for_pathfinder_testing.ps1 @@ -1,31 +1,30 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION # SPDX-License-Identifier: Apache-2.0 param( - [Parameter(Mandatory = $true)] - [string]$CudaVersion + [Parameter(Mandatory = $true, Position = 0)] + [string]$PythonMajorMinor, + [Parameter(Mandatory = $true, Position = 1)] + [string]$CudaMajorMinorPatch ) $ErrorActionPreference = "Stop" +Set-StrictMode -Version Latest & "$env:CONDA_EXE" "shell.powershell" "hook" | Out-String | Invoke-Expression -conda create --yes -n "pathfinder_testing_cu$CudaVersion" python=3.13 "cuda-toolkit=$CudaVersion" -conda activate "pathfinder_testing_cu$CudaVersion" +conda create --yes -n "pathfinder_testing_cu$CudaMajorMinorPatch" "python=$PythonMajorMinor" "cuda-toolkit=$CudaMajorMinorPatch" +conda activate "pathfinder_testing_cu$CudaMajorMinorPatch" +# Keep this list aligned with the Windows-installable subset of +# cuda_pathfinder/pyproject.toml. $cpkgs = @( "cusparselt-dev", "cutensor", - "libcublasmp-dev", + "cutlass", "libcudss-dev", - "libcufftmp-dev", - "libmathdx-dev", - "libnvshmem3", - "libnvshmem-dev", - "libnvpl-fft-dev" + "libmathdx-dev" ) -foreach ($cpkg in $cpkgs) { - Write-Host "CONDA INSTALL: $cpkg" - conda install -y -c conda-forge $cpkg -} +Write-Host "CONDA INSTALL: $($cpkgs -join ' ')" +conda install -y -c conda-forge @cpkgs diff --git a/toolshed/conda_create_for_pathfinder_testing.sh b/toolshed/conda_create_for_pathfinder_testing.sh index 1ed57e6765b..69844904921 100755 --- a/toolshed/conda_create_for_pathfinder_testing.sh +++ b/toolshed/conda_create_for_pathfinder_testing.sh @@ -1,28 +1,51 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if [[ $# -ne 1 ]]; then - echo "Usage: $(basename "$0") ctk-major-minor-patch" 1>&2 +set -euo pipefail + +if [[ $# -ne 2 ]]; then + echo "Usage: $(basename "$0") python_major_minor cuda_major_minor_patch" 1>&2 exit 1 fi +python_major_minor="$1" +cuda_major_minor_patch="$2" +cuda_major="${cuda_major_minor_patch%%.*}" +uname_m="$(uname -m)" + eval "$(conda shell.bash hook)" -conda create --yes -n "pathfinder_testing_cu$1" python=3.13 cuda-toolkit="$1" -conda activate "pathfinder_testing_cu$1" - -for cpkg in \ - cusparselt-dev \ - cutensor \ - libcublasmp-dev \ - libcudss-dev \ - libcufftmp-dev \ - libmathdx-dev \ - libnvshmem3 \ - libnvshmem-dev \ - libnvpl-fft-dev; do - echo "CONDA INSTALL: $cpkg" - conda install -y -c conda-forge "$cpkg" -done +conda create --yes -n "pathfinder_testing_cu$cuda_major_minor_patch" "python=$python_major_minor" cuda-toolkit="$cuda_major_minor_patch" +set +u +conda activate "pathfinder_testing_cu$cuda_major_minor_patch" +set -u + +# Keep this list aligned with the Linux-installable subset of +# cuda_pathfinder/pyproject.toml. +cpkgs=( + "cusparselt-dev" + "cutensor" + "cutlass" + "libcublasmp-dev" + "libcudss-dev" + "libcufftmp-dev" + "libcusolvermp-dev" + "libmathdx-dev" + "libnvshmem3" + "libnvshmem-dev" +) + +# Keep the conda environment aligned with platform-scoped pyproject groups. +if [[ "$uname_m" == "aarch64" ]]; then + cpkgs+=("libnvpl-fft-dev") + if (( cuda_major >= 13 )); then + cpkgs+=("libcudla-dev") + fi +fi + +echo "CONDA INSTALL: ${cpkgs[*]}" +set +u +conda install -y -c conda-forge "${cpkgs[@]}" +set -u