Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions toolshed/conda_create_for_pathfinder_testing.ps1
Original file line number Diff line number Diff line change
@@ -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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to spell out more what "modernization's" you are doing. I'm not sure what you are modernizing based on the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: See the massively expanded PR description.


& "$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
61 changes: 42 additions & 19 deletions toolshed/conda_create_for_pathfinder_testing.sh
Original file line number Diff line number Diff line change
@@ -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