-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmeta.yaml
327 lines (306 loc) · 15.8 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# Make sure the component versions are consistent with the SDK version!
{% set version = "23.06.1.8" %}
{% set cusv_version = "1.4.1" %}
{% set cutn_version = "2.2.1" %}
{% if cuda_compiler_version in (None, "None", True, False) %}
{% set cuda_major = 0 %}
{% else %}
{% set cuda_major = environ.get("cuda_compiler_version", "11.2").split(".")[0]|int %}
{% endif %}
# prioritize nompi variant via build number
{% set build_num = 1 %}
{% if mpi == 'nompi' %}
{% set cutn_build = build_num + 100 %}
{% else %}
{% set cutn_build = build_num %}
{% endif %}
# encode mpi dependency in the build string
{% if mpi != "nompi" %}
{% set mpi_prefix = "mpi_" + mpi %}
{% else %}
{% set mpi_prefix = "nompi" %}
{% endif %}
package:
name: cuquantum-sdk # dummy
version: {{ version }}
source:
- url: https://developer.download.nvidia.com/compute/cuquantum/redist/cuquantum/linux-x86_64/cuquantum-linux-x86_64-{{ version }}_cuda{{ cuda_major }}-archive.tar.xz # [linux64]
sha256: 7794952a6dc8593881b0aef5798a6a2bf5087bc64748ec951971235d2357aae3 # [linux64 and (cuda_compiler_version or "").startswith("11")]
sha256: 6f53da19c6f052ed1eb83a3c594862a161c92517c7fa2e0c054466d7783d4920 # [linux64 and (cuda_compiler_version or "").startswith("12")]
- url: https://developer.download.nvidia.com/compute/cuquantum/redist/cuquantum/linux-sbsa/cuquantum-linux-sbsa-{{ version }}_cuda{{ cuda_major }}-archive.tar.xz # [aarch64]
sha256: 9cbd6f44705133a8743048276bc81823f0778a0d107cce641600e1a3dfc1ae75 # [aarch64 and (cuda_compiler_version or "").startswith("11")]
sha256: c0b6c54b790907b30a57e4e0c8dd9620e2bd4d0cd67134ccf063af1d4c36b160 # [aarch64 and (cuda_compiler_version or "").startswith("12")]
- url: https://developer.download.nvidia.com/compute/cuquantum/redist/cuquantum/linux-ppc64le/cuquantum-linux-ppc64le-{{ version }}_cuda{{ cuda_major }}-archive.tar.xz # [ppc64le]
sha256: 5265dc591d7c4352eaf1d3b5cbb7780af5d1255714c36f0436b8297f62a9f6bb # [ppc64le and (cuda_compiler_version or "").startswith("11")]
sha256: d8a52117c2adc874363d4f128344e80ee9fb1b45e1c572377cf6f3392a95362c # [ppc64le and (cuda_compiler_version or "").startswith("12")]
# TODO: revert me
# - url: https://github.com/NVIDIA/cuQuantum/archive/refs/tags/v{{ ".".join(version.split(".")[:3]) }}.tar.gz
- url: https://github.com/NVIDIA/cuQuantum/archive/refs/tags/v23.06.0.tar.gz
sha256: 0c819a21d0dfc158d19c44f999d2caeb19a9f4567baa0e77d712a83315c039e8
build:
number: {{ build_num }}
skip: true # [not linux or cuda_compiler_version not in ("11.2", "12.0")]
outputs:
- name: cuquantum
version: {{ version }}
build:
number: {{ build_num }}
requirements:
build:
host:
run:
- {{ pin_subpackage('custatevec', max_pin='x.x.x') }}
- {{ pin_subpackage('cutensornet', max_pin='x.x.x') }}
test:
commands:
- echo "ok!"
- name: custatevec
version: {{ cusv_version }}
build:
number: {{ build_num }}
script:
- mkdir -p $PREFIX/include # [linux]
- mv include/custatevec.h $PREFIX/include/ # [linux]
- mkdir -p $PREFIX/lib # [linux]
- mv lib/libcustatevec.so* $PREFIX/lib/ # [linux]
run_exports:
- {{ pin_subpackage('custatevec', max_pin='x') }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
missing_dso_whitelist:
- '*/libcublas.so*' # [(cuda_compiler_version or "").startswith("11")]
- '*/libcublasLt.so*' # [(cuda_compiler_version or "").startswith("11")]
post-link: post-link # this is supported by conda-build, but undocumented
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- sysroot_{{ target_platform }} 2.17 # [linux]
host:
- libcublas # [(cuda_compiler_version or "").startswith("12")]
- cuda-version {{ cuda_major }}.0
run:
- cudatoolkit # [(cuda_compiler_version or "").startswith("11")]
- {{ pin_compatible('libcublas', max_pin='x') }} # [(cuda_compiler_version or "").startswith("12")]
- {{ pin_compatible('cuda-version', max_pin='x') }}
# this should be set once conda-forge supports newer glibc
# https://github.com/conda-forge/conda-forge.github.io/issues/1941
# run_constrained:
# - __glibc >=2.27 # [aarch64 or ppc64le]
# apparently conda-build supports full test section spec, the document is super outdated
test:
requires:
- git
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
# make sure we pick up the version matching the docker,
# or the linker would complain
- cuda-version {{ cuda_compiler_version }}.*
- sysroot_{{ target_platform }} 2.17 # [linux]
files:
- test_load_elf.c
- cusv_run_test.sh
commands:
- ./cusv_run_test.sh {{ version }}
about:
home: https://developer.nvidia.com/cuquantum-sdk
license: LicenseRef-cuQuantum-Software-License-Agreement
license_url: https://docs.nvidia.com/cuda/cuquantum/license.html
license_file: LICENSE
summary: 'cuStateVec: A High-Performance Library for State Vector Quantum Simulators'
description: |
NVIDIA cuStateVec is a high-performance GPU library dedicated to operations with state vectors
for expressing quantum algorithms. cuStateVec is a component of the NVIDIA cuQuantum SDK.
The packages cuquantum, custatevec, and cutensornet are governed by the NVIDIA cuQuantum
Software License Agreement (EULA). By downloading and using the packages,
you accept the terms and conditions of the NVIDIA cuQuantum EULA -
https://docs.nvidia.com/cuda/cuquantum/license.html
doc_url: https://docs.nvidia.com/cuda/cuquantum/latest/custatevec/
dev_url: https://github.com/NVIDIA/cuQuantum
- name: cutensornet
version: {{ cutn_version }}
build:
number: {{ cutn_build }}
string: "{{ mpi_prefix }}_h{{ PKG_HASH }}_{{ cutn_build }}"
script:
- mkdir -p $PREFIX/include # [linux]
- mv include/cutensornet* $PREFIX/include/ # [linux]
- mkdir -p $PREFIX/lib # [linux]
- mv lib/libcutensornet.so* $PREFIX/lib/ # [linux]
# build the wrapper lib
- $GCC -shared -std=c11 -fPIC -I$CUDA_PATH/include -I$PREFIX/include distributed_interfaces/cutensornet_distributed_interface_mpi.c -L$PREFIX/lib -lmpi -o $PREFIX/lib/libcutensornet_distributed_interface_mpi.so # [mpi != 'nompi' and (cuda_compiler_version or "").startswith("11")]
- $GCC -shared -std=c11 -fPIC $CFLAGS -I$PREFIX/include distributed_interfaces/cutensornet_distributed_interface_mpi.c -L$PREFIX/lib -lmpi -o $PREFIX/lib/libcutensornet_distributed_interface_mpi.so # [mpi != 'nompi' and (cuda_compiler_version or "").startswith("12")]
# copy activate/deactivate scripts
- mkdir -p "${PREFIX}/etc/conda/activate.d" # [mpi != 'nompi']
- cp "${RECIPE_DIR}/cutn-activate.sh" "${PREFIX}/etc/conda/activate.d/cutn-activate.sh" # [mpi != 'nompi']
- mkdir -p "${PREFIX}/etc/conda/deactivate.d" # [mpi != 'nompi']
- cp "${RECIPE_DIR}/cutn-deactivate.sh" "${PREFIX}/etc/conda/deactivate.d/cutn-deactivate.sh" # [mpi != 'nompi']
run_exports:
- {{ pin_subpackage('cutensornet', max_pin='x') }} {{ mpi_prefix }}_*
ignore_run_exports_from:
- {{ compiler('cuda') }}
missing_dso_whitelist:
- '*/libcutensor.so*' # [(cuda_compiler_version or "").startswith("11")]
- '*/libcublas.so*' # [(cuda_compiler_version or "").startswith("11")]
- '*/libcublasLt.so*' # [(cuda_compiler_version or "").startswith("11")]
- '*/libcusolver.so*' # [(cuda_compiler_version or "").startswith("11")]
post-link: post-link # this is supported by conda-build, but undocumented
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- sysroot_{{ target_platform }} 2.17 # [linux]
host:
- {{ mpi }} # [mpi != 'nompi']
- cutensor
- libcublas # [(cuda_compiler_version or "").startswith("12")]
- libcusolver # [(cuda_compiler_version or "").startswith("12")]
- cuda-version {{ cuda_major }}.0
run:
- {{ pin_compatible('cutensor', max_pin='x') }}
- {{ pin_compatible('libcublas', max_pin='x') }} # [(cuda_compiler_version or "").startswith("12")]
- {{ pin_compatible('libcusolver', max_pin='x') }} # [(cuda_compiler_version or "").startswith("12")]
- {{ pin_compatible('cuda-version', max_pin='x') }}
# conda-forge mpich does not support CUDA...
- {{ mpi }} * external* # [mpi == 'mpich']
- {{ mpi }} # [mpi == 'openmpi']
run_constrained:
# if users also wanna install mpi, we need to ensure the nompi version is not
# picked by the solver, we do so by createing a conflict
- openmpi <0.a0 # [mpi == 'nompi']
- mpich <0.a0 # [mpi == 'nompi']
# apparently conda-build supports full test section spec, the document is super outdated
test:
requires:
- git
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
# make sure we pick up the version matching the docker,
# or the linker would complain
- cuda-version {{ cuda_compiler_version }}.*
- sysroot_{{ target_platform }} 2.17 # [linux]
files:
- test_load_elf.c
- cutn_run_test.sh
commands:
- ./cutn_run_test.sh {{ version }}
- echo $CUTENSORNET_COMM_LIB
- test -n $CUTENSORNET_COMM_LIB # [mpi != 'nompi']
- test -f $CUTENSORNET_COMM_LIB # [mpi != 'nompi']
- test -z $CUTENSORNET_COMM_LIB # [mpi == 'nompi']
about:
home: https://developer.nvidia.com/cuquantum-sdk
license: LicenseRef-cuQuantum-Software-License-Agreement
license_url: https://docs.nvidia.com/cuda/cuquantum/license.html
license_file: LICENSE
summary: 'cuTensorNet: A High-Performance Library for Tensor Network Computations'
description: |
NVIDIA cuTensorNet is a high-performance GPU library for tensor network computations,
a component of the NVIDIA cuQuantum SDK.
The packages cuquantum, custatevec, and cutensornet are governed by the NVIDIA cuQuantum
Software License Agreement (EULA). By downloading and using the packages,
you accept the terms and conditions of the NVIDIA cuQuantum EULA -
https://docs.nvidia.com/cuda/cuquantum/license.html
doc_url: https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/
dev_url: https://github.com/NVIDIA/cuQuantum
- name: cuquantum-python
# TODO: revert me
# version: {{ ".".join(version.split(".")[:3]) }}
version: 23.06.0
build:
number: {{ build_num }}
# build cuQuantum Python in a CUDA agnostic way to serve both CUDA 11/12
# (note: this would still use cuda_compiler_version to calculate hash)
skip: true # [not (cuda_compiler_version or "").startswith("11") or (py < 39)]
script_env:
- CUQUANTUM_ROOT=$PREFIX
- CUTENSOR_ROOT=$PREFIX
script:
# The CUDA 11 docker image sets CUDA_PATH for us
- export CUDA_PATH=$BUILD_PREFIX/targets/x86_64-linux/ # [linux64 and (cuda_compiler_version or "").startswith("12")]
- export CUDA_PATH=$BUILD_PREFIX/targets/sbsa-linux/ # [aarch64 and (cuda_compiler_version or "").startswith("12")]
- export CUDA_PATH=$BUILD_PREFIX/targets/ppc64le-linux/ # [ppc64le and (cuda_compiler_version or "").startswith("12")]
- cd python
# {{ PYTHON }} is not resolved properly in multi-output recipes...
- $PREFIX/bin/python -m pip install --no-deps --no-build-isolation -vv .
ignore_run_exports_from:
# let cuquantum handle the CUDA deps
- {{ compiler('cuda') }}
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- sysroot_{{ target_platform }} 2.17 # [linux]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python # [build_platform != target_platform]
- cython # [build_platform != target_platform]
host:
- python
- pip
- cython
- custatevec ={{ cusv_version }}
- cutensornet ={{ cutn_version }}
- packaging
run:
- python
- numpy >=1.21,<2
- cupy >=10.0
- {{ pin_subpackage('custatevec', max_pin='x') }}
- {{ pin_subpackage('cutensornet', max_pin='x') }}
- cuda-version >=11.0.*,<13.a0 # again, cuQuantum Python is "CUDA agnostic"
run_constrained:
- pytorch >=1.10
- mpi4py >=3.1.0
# we don't have to pin Qiskit or Cirq here because their versions are fairly recent on conda-forge
test:
requires:
- cuda-driver-dev # [linux and (cuda_compiler_version or "").startswith("12")]
commands:
# perform the import test via CLI because we need to load the stub for CUDA 12
- export CUDA_STUB="$PREFIX/lib/stubs/libcuda.so" # [(cuda_compiler_version or "").startswith("12")]
- LD_PRELOAD="$CUDA_STUB" python -c "import cuquantum"
- LD_PRELOAD="$CUDA_STUB" python -c "import cuquantum.custatevec"
- LD_PRELOAD="$CUDA_STUB" python -c "import cuquantum.cutensornet"
- LD_PRELOAD="$CUDA_STUB" python -m cuquantum --includes --libs --target custatevec --target cutensornet
about:
home: https://developer.nvidia.com/cuquantum-sdk
license: BSD-3-Clause
license_url: https://docs.nvidia.com/cuda/cuquantum/license.html#nvidia-cuquantum-python
license_file: LICENSE
summary: "cuQuantum Python: Python APIs for NVIDIA cuQuantum SDK"
description: |
NVIDIA cuQuantum Python provides Python bindings and high-level object-oriented
models for accessing the full functionalities of NVIDIA cuQuantum SDK from Python.
doc_url: https://docs.nvidia.com/cuda/cuquantum/latest/python/
dev_url: https://github.com/NVIDIA/cuQuantum
about:
home: https://developer.nvidia.com/cuquantum-sdk
license: LicenseRef-cuQuantum-Software-License-Agreement
license_url: https://docs.nvidia.com/cuda/cuquantum/license.html
license_file: LICENSE
summary: 'cuQuantum SDK: A High-Performance Library for Accelerating Quantum Information Science'
description: |
NVIDIA cuQuantum is an SDK of optimized libraries and tools for accelerating quantum computing workflows.
Using NVIDIA GPU Tensor Core GPUs, developers can use cuQuantum to speed up quantum circuit simulations
based on state vector and tensor network methods by orders of magnitude. Two major components of the
SDK are
- cuStateVec: a high-performance library for state vector computations
- cuTensorNet: a high-performance library for tensor network computations
The packages cuquantum, custatevec, and cutensornet are governed by the NVIDIA cuQuantum
Software License Agreement (EULA). By downloading and using the packages,
you accept the terms and conditions of the NVIDIA cuQuantum EULA -
https://docs.nvidia.com/cuda/cuquantum/license.html
doc_url: https://docs.nvidia.com/cuda/cuquantum/index.html
dev_url: https://github.com/NVIDIA/cuQuantum
extra:
recipe-maintainers:
- leofang
- JeremyWangNVDA
- mtjrider
- yangcal
- DmitryLyakh