Commit f401388
[no-ci] toolshed: modernize
* toolshed: modernize conda_create_for_pathfinder_testing scripts
Bring the bash and PowerShell helpers used to spin up CUDA-pathfinder
test environments into line with how cuda_pathfinder/pyproject.toml is
now organized, and harden them so common shell mistakes surface
immediately.
Highlights:
- Add ``set -euo pipefail`` (bash) and ``Set-StrictMode -Version Latest``
(PowerShell) so unset variables and non-zero exit codes fail loudly.
- Pick the Python version from the CUDA major: ``12.x`` -> 3.12,
``13.x`` -> 3.14. Reject other CUDA majors with a clear error
instead of silently installing 3.13.
- Bash: wrap ``conda activate`` and ``conda install`` in ``set +u`` /
``set -u`` because conda's shims dereference unset variables, which
otherwise abort the script under ``set -u``.
- Realign the conda package lists with the platform-scoped groups in
``cuda_pathfinder/pyproject.toml``:
- Add ``cutlass`` (Linux + Windows) and ``libcusolvermp-dev`` (Linux).
- Drop ``libnvpl-fft-dev`` from the unconditional Linux list and from
Windows entirely.
- On Linux, install ``libnvpl-fft-dev`` only on ``aarch64`` and add
``libcudla-dev`` for the ``cu13``/``aarch64`` combination.
- Drop ``libcublasmp-dev``, ``libcufftmp-dev``, ``libnvshmem3``, and
``libnvshmem-dev`` from the Windows list to match what ``pyproject``
installs there.
- Refresh SPDX copyright to ``2025-2026``.
Co-authored-by: Cursor <cursoragent@cursor.com>
* toolshed: batch the conda installs into a single solve
Replace the per-package ``conda install`` loop in both the bash and
PowerShell helpers with a single batched call that hands the full
package list to one solver invocation.
A single ``conda install -y -c conda-forge "${cpkgs[@]}"`` (bash) /
``conda install -y -c conda-forge @cpkgs`` (PowerShell) is both faster
and more consistent than calling ``conda install`` N times: the loop
form runs the solver once per package, and each independent solve can
downgrade or upgrade shared dependencies that the prior step just
installed.
The ``set +u`` / ``set -u`` shim around the bash call is preserved
because conda's shell wrapper still dereferences unset variables
regardless of how many packages are passed.
Not yet exercised against a real conda environment; the next
end-to-end run will use this batched form.
Addresses review feedback from @rparolin on PR #2013.
* toolshed: take python_major_minor as an argument and align variable naming
Make the Python version a required argument to both helpers instead of
deriving it from the CUDA major. The previous case/switch over the
CUDA major was a brittle source of truth: every time a new Python or
CUDA line was supported, the helper would silently install the wrong
Python until it was updated. Pushing the choice to the caller keeps
the helpers focused on the conda environment they manage and lets the
caller pick whatever Python they actually want to test against.
New usage on both platforms is parallel:
conda_create_for_pathfinder_testing.sh 3.12 12.9.2
conda_create_for_pathfinder_testing.ps1 3.12 12.9.2
Variable / parameter names now match the usage line and read
identically across the two scripts:
- bash: ``python_major_minor`` / ``cuda_major_minor_patch``
- PowerShell: ``$PythonMajorMinor`` / ``$CudaMajorMinorPatch``
The PowerShell ``param()`` block uses ``Mandatory + Position 0/1`` so
the script accepts both positional invocation (matching the bash style
above) and the named ``-PythonMajorMinor`` / ``-CudaMajorMinorPatch``
form.
Switch the ``libcudla-dev`` gate from ``cuda_major == "13"`` to
``(( cuda_major >= 13 ))`` so future CUDA majors fall through to the
correct branch automatically. ``(( ))`` is the idiomatic bash form for
integer comparison; the script is already firmly bash-only
(``#!/bin/bash``, ``set -euo pipefail``), so the syntax is in keeping
with the rest of the file.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>conda_create_for_pathfinder_testing scripts (#2013)1 parent ffac267 commit f401388
2 files changed
Lines changed: 56 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | | - | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
20 | 25 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments