1111 - ' python/selene-plugins/**'
1212 - ' crates/pecos-qsim/**'
1313 - ' crates/pecos-core/**'
14- - ' crates/pecos-quest/**'
1514 - ' .github/workflows/selene-plugins.yml'
1615 pull_request :
1716 branches : [master, development, dev]
1817 paths :
1918 - ' python/selene-plugins/**'
2019 - ' crates/pecos-qsim/**'
2120 - ' crates/pecos-core/**'
22- - ' crates/pecos-quest/**'
2321 - ' .github/workflows/selene-plugins.yml'
2422 workflow_dispatch :
2523
@@ -60,61 +58,18 @@ jobs:
6058 - name : Cache Rust
6159 uses : Swatinem/rust-cache@v2
6260
63- # Install CUDA Toolkit for GPU support (compile-time only, no GPU needed)
64- # Linux: Use network method with non-cuda-sub-packages for libcublas
65- # Windows: Use local method with specific sub-packages to avoid VS integration bug
66- # macOS: NVIDIA dropped CUDA support in 2019
67- - name : Install CUDA Toolkit (Linux)
68- if : runner.os == 'Linux'
69- uses : Jimver/cuda-toolkit@v0.2.30
70- with :
71- cuda : ' 12.6.3'
72- method : ' network'
73- sub-packages : ' ["nvcc", "cudart-dev"]'
74- non-cuda-sub-packages : ' ["libcublas", "libcublas-dev"]'
75-
76- # Set up Visual Studio environment on Windows (required for nvcc to find cl.exe)
77- - name : Set up Visual Studio environment (Windows)
78- if : runner.os == 'Windows'
79- uses : ilammy/msvc-dev-cmd@v1
80- with :
81- arch : x64
82-
83- # Windows CUDA: Uses specific sub-packages to avoid VS 17.3.x bug
84- # See: https://github.com/Jimver/cuda-toolkit/issues/382
85- - name : Install CUDA Toolkit (Windows)
86- if : runner.os == 'Windows'
87- uses : Jimver/cuda-toolkit@v0.2.30
88- with :
89- cuda : ' 12.5.1'
90- method : ' local'
91- sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust"]'
92-
9361 - name : Build Selene plugins (Unix)
9462 if : runner.os != 'Windows'
9563 run : |
96- # Build all selene plugin Rust libraries
97- # pecos-selene-quest is built with CUDA feature on Linux (not macOS - NVIDIA dropped CUDA support in 2019)
98- if [ "${{ runner.os }}" = "Linux" ]; then
99- cargo build --release -p pecos-selene-quest --features cuda
100- else
101- cargo build --release -p pecos-selene-quest
102- fi
10364 cargo build --release \
104- -p pecos-selene-qulacs \
105- -p pecos-selene-sparsestab \
65+ -p pecos-selene-stab \
10666 -p pecos-selene-statevec
10767
108- # Windows: Use PowerShell to avoid Git Bash PATH conflict where Git's /usr/bin/link
109- # shadows MSVC's link.exe linker
11068 - name : Build Selene plugins (Windows)
11169 if : runner.os == 'Windows'
11270 shell : pwsh
11371 run : |
114- # Build pecos-selene-quest with CUDA feature
115- cargo build --release -p pecos-selene-quest --features cuda
116- # Build other plugins
117- cargo build --release -p pecos-selene-qulacs -p pecos-selene-sparsestab -p pecos-selene-statevec
72+ cargo build --release -p pecos-selene-stab -p pecos-selene-statevec
11873
11974 - name : Copy libraries to Python packages (Unix)
12075 if : runner.os != 'Windows'
@@ -127,49 +82,25 @@ jobs:
12782 fi
12883
12984 # Copy libraries
130- mkdir -p python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib
131- mkdir -p python/selene-plugins/pecos-selene-qulacs/python/pecos_selene_qulacs/_dist/lib
132- mkdir -p python/selene-plugins/pecos-selene-sparsestab/python/pecos_selene_sparsestab/_dist/lib
85+ mkdir -p python/selene-plugins/pecos-selene-stab/python/pecos_selene_stab/_dist/lib
13386 mkdir -p python/selene-plugins/pecos-selene-statevec/python/pecos_selene_statevec/_dist/lib
13487
135- cp target/release/libpecos_selene_quest.$EXT python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib/
136- cp target/release/libpecos_selene_qulacs.$EXT python/selene-plugins/pecos-selene-qulacs/python/pecos_selene_qulacs/_dist/lib/
137- cp target/release/libpecos_selene_sparsestab.$EXT python/selene-plugins/pecos-selene-sparsestab/python/pecos_selene_sparsestab/_dist/lib/
88+ cp target/release/libpecos_selene_stab.$EXT python/selene-plugins/pecos-selene-stab/python/pecos_selene_stab/_dist/lib/
13889 cp target/release/libpecos_selene_statevec.$EXT python/selene-plugins/pecos-selene-statevec/python/pecos_selene_statevec/_dist/lib/
13990
140- # Copy QuEST CUDA backend if it exists (built when --features cuda is used)
141- # This backend is loaded at runtime via dlopen, allowing the wheel to work
142- # on systems both with and without NVIDIA CUDA installed
143- if [ -f "target/release/libpecos_quest_cuda.$EXT" ]; then
144- echo "Copying QuEST CUDA backend..."
145- cp target/release/libpecos_quest_cuda.$EXT python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib/
146- fi
147-
14891 - name : Copy libraries to Python packages (Windows)
14992 if : runner.os == 'Windows'
15093 shell : pwsh
15194 run : |
152- New-Item -ItemType Directory -Force -Path python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib
153- New-Item -ItemType Directory -Force -Path python/selene-plugins/pecos-selene-qulacs/python/pecos_selene_qulacs/_dist/lib
154- New-Item -ItemType Directory -Force -Path python/selene-plugins/pecos-selene-sparsestab/python/pecos_selene_sparsestab/_dist/lib
95+ New-Item -ItemType Directory -Force -Path python/selene-plugins/pecos-selene-stab/python/pecos_selene_stab/_dist/lib
15596 New-Item -ItemType Directory -Force -Path python/selene-plugins/pecos-selene-statevec/python/pecos_selene_statevec/_dist/lib
15697
157- Copy-Item target/release/pecos_selene_quest.dll python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib/
158- Copy-Item target/release/pecos_selene_qulacs.dll python/selene-plugins/pecos-selene-qulacs/python/pecos_selene_qulacs/_dist/lib/
159- Copy-Item target/release/pecos_selene_sparsestab.dll python/selene-plugins/pecos-selene-sparsestab/python/pecos_selene_sparsestab/_dist/lib/
98+ Copy-Item target/release/pecos_selene_stab.dll python/selene-plugins/pecos-selene-stab/python/pecos_selene_stab/_dist/lib/
16099 Copy-Item target/release/pecos_selene_statevec.dll python/selene-plugins/pecos-selene-statevec/python/pecos_selene_statevec/_dist/lib/
161100
162- # Copy QuEST CUDA backend if it exists (built when --features cuda is used)
163- if (Test-Path target/release/pecos_quest_cuda.dll) {
164- Write-Host "Copying QuEST CUDA backend..."
165- Copy-Item target/release/pecos_quest_cuda.dll python/selene-plugins/pecos-selene-quest/python/pecos_selene_quest/_dist/lib/
166- }
167-
168101 - name : Install Python packages
169102 run : |
170- uv pip install --system -e ./python/selene-plugins/pecos-selene-quest[test]
171- uv pip install --system -e ./python/selene-plugins/pecos-selene-qulacs[test]
172- uv pip install --system -e ./python/selene-plugins/pecos-selene-sparsestab[test]
103+ uv pip install --system -e ./python/selene-plugins/pecos-selene-stab[test]
173104 uv pip install --system -e ./python/selene-plugins/pecos-selene-statevec[test]
174105
175106 - name : Run tests
@@ -185,12 +116,8 @@ jobs:
185116 matrix :
186117 os : [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
187118 plugin :
188- - name : pecos-selene-quest
189- package : pecos_selene_quest
190- - name : pecos-selene-qulacs
191- package : pecos_selene_qulacs
192- - name : pecos-selene-sparsestab
193- package : pecos_selene_sparsestab
119+ - name : pecos-selene-stab
120+ package : pecos_selene_stab
194121 - name : pecos-selene-statevec
195122 package : pecos_selene_statevec
196123
@@ -213,62 +140,16 @@ jobs:
213140 - name : Cache Rust
214141 uses : Swatinem/rust-cache@v2
215142
216- # Install CUDA Toolkit for GPU support (compile-time only, no GPU needed)
217- # Linux: Use network method with non-cuda-sub-packages for libcublas
218- # Windows: Use local method with specific sub-packages to avoid VS integration bug
219- # macOS: NVIDIA dropped CUDA support in 2019
220- - name : Install CUDA Toolkit (Linux)
221- if : runner.os == 'Linux' && matrix.plugin.name == 'pecos-selene-quest'
222- uses : Jimver/cuda-toolkit@v0.2.30
223- with :
224- cuda : ' 12.6.3'
225- method : ' network'
226- sub-packages : ' ["nvcc", "cudart-dev"]'
227- non-cuda-sub-packages : ' ["libcublas", "libcublas-dev"]'
228-
229- # Set up Visual Studio environment on Windows (required for nvcc to find cl.exe)
230- - name : Set up Visual Studio environment (Windows)
231- if : runner.os == 'Windows' && matrix.plugin.name == 'pecos-selene-quest'
232- uses : ilammy/msvc-dev-cmd@v1
233- with :
234- arch : x64
235-
236- # Windows CUDA: Uses specific sub-packages to avoid VS 17.3.x bug
237- # See: https://github.com/Jimver/cuda-toolkit/issues/382
238- - name : Install CUDA Toolkit (Windows)
239- if : runner.os == 'Windows' && matrix.plugin.name == 'pecos-selene-quest'
240- uses : Jimver/cuda-toolkit@v0.2.30
241- with :
242- cuda : ' 12.5.1'
243- method : ' local'
244- sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust"]'
245-
246143 - name : Build Rust library (Unix)
247144 if : runner.os != 'Windows'
248145 run : |
249- # Build pecos-selene-quest with CUDA feature on Linux (not macOS - NVIDIA dropped CUDA support in 2019)
250- if [ "${{ matrix.plugin.name }}" = "pecos-selene-quest" ]; then
251- if [ "${{ runner.os }}" = "Linux" ]; then
252- cargo build --release -p ${{ matrix.plugin.name }} --features cuda
253- else
254- cargo build --release -p ${{ matrix.plugin.name }}
255- fi
256- else
257- cargo build --release -p ${{ matrix.plugin.name }}
258- fi
146+ cargo build --release -p ${{ matrix.plugin.name }}
259147
260- # Windows: Use PowerShell to avoid Git Bash PATH conflict where Git's /usr/bin/link
261- # shadows MSVC's link.exe linker
262148 - name : Build Rust library (Windows)
263149 if : runner.os == 'Windows'
264150 shell : pwsh
265151 run : |
266- # Build pecos-selene-quest with CUDA feature
267- if ("${{ matrix.plugin.name }}" -eq "pecos-selene-quest") {
268- cargo build --release -p ${{ matrix.plugin.name }} --features cuda
269- } else {
270- cargo build --release -p ${{ matrix.plugin.name }}
271- }
152+ cargo build --release -p ${{ matrix.plugin.name }}
272153
273154 - name : Copy library to Python package (Unix)
274155 if : runner.os != 'Windows'
@@ -282,15 +163,6 @@ jobs:
282163 mkdir -p "$PLUGIN_DIR/python/${{ matrix.plugin.package }}/_dist/lib"
283164 cp "target/release/lib${{ matrix.plugin.package }}.$EXT" "$PLUGIN_DIR/python/${{ matrix.plugin.package }}/_dist/lib/"
284165
285- # Copy QuEST CUDA backend if it exists (built when --features cuda is used for pecos-selene-quest)
286- # Only available on Linux (NVIDIA dropped macOS CUDA support in 2019)
287- # This backend is loaded at runtime via dlopen, allowing the wheel to work
288- # on systems both with and without NVIDIA CUDA installed
289- if [ "${{ matrix.plugin.name }}" = "pecos-selene-quest" ] && [ -f "target/release/libpecos_quest_cuda.$EXT" ]; then
290- echo "Copying QuEST CUDA backend..."
291- cp "target/release/libpecos_quest_cuda.$EXT" "$PLUGIN_DIR/python/${{ matrix.plugin.package }}/_dist/lib/"
292- fi
293-
294166 - name : Copy library to Python package (Windows)
295167 if : runner.os == 'Windows'
296168 shell : pwsh
@@ -299,12 +171,6 @@ jobs:
299171 New-Item -ItemType Directory -Force -Path "$pluginDir/python/${{ matrix.plugin.package }}/_dist/lib"
300172 Copy-Item "target/release/${{ matrix.plugin.package }}.dll" "$pluginDir/python/${{ matrix.plugin.package }}/_dist/lib/"
301173
302- # Copy QuEST CUDA backend if it exists (built when --features cuda is used for pecos-selene-quest)
303- if ("${{ matrix.plugin.name }}" -eq "pecos-selene-quest" -and (Test-Path "target/release/pecos_quest_cuda.dll")) {
304- Write-Host "Copying QuEST CUDA backend..."
305- Copy-Item "target/release/pecos_quest_cuda.dll" "$pluginDir/python/${{ matrix.plugin.package }}/_dist/lib/"
306- }
307-
308174 - name : Build wheel
309175 run : |
310176 cd python/selene-plugins/${{ matrix.plugin.name }}
0 commit comments