-
Notifications
You must be signed in to change notification settings - Fork 287
[no-ci] toolshed: modernize conda_create_for_pathfinder_testing scripts
#2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rwgk
merged 4 commits into
NVIDIA:main
from
rwgk:toolshed_conda_create_for_pathfinder_modernizations
May 17, 2026
+56
−34
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0df4909
toolshed: modernize conda_create_for_pathfinder_testing scripts
rwgk 293bdcd
Merge branch 'main' into toolshed_conda_create_for_pathfinder_moderni…
rwgk 76d2524
toolshed: batch the conda installs into a single solve
rwgk 2d7dfe9
toolshed: take python_major_minor as an argument and align variable n…
rwgk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| 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 | ||
|
|
||
| & "$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 | ||
This file contains hidden or 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
| 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.