diff --git a/recipes/cupy/meta.yaml b/recipes/cupy/meta.yaml new file mode 100755 index 0000000000000..b7c30233c75bc --- /dev/null +++ b/recipes/cupy/meta.yaml @@ -0,0 +1,59 @@ +{% set name = "cupy" %} +{% set version = "6.4.0" %} +{% set sha256 = "2a3cd1812f043ba9451b8ca4e5a4c31f9acc486c003f6970836e1a46c735c82e" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/cupy/cupy/archive/v{{ version }}.tar.gz + sha256: {{ sha256 }} + +build: + number: 0 + skip: True # [not (linux64 and cuda_compiler_version != "None")] + script: "{{ PYTHON }} -m pip install . -vv" + missing_dso_whitelist: + - "*/libcuda.*" + +requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - {{ compiler("cuda") }} + + host: + - python + - pip + - setuptools + - cython >=0.24.0 + - cudnn + - fastrlock >=0.3 + - nccl + + run: + - python + - setuptools + - cudnn + - fastrlock >=0.3 + - numpy >=1.9.0 + - six >=1.9.0 + +test: + requires: + - pytest + - mock + source_files: + - tests + +about: + home: https://cupy.chainer.org/ + license: MIT + license_family: MIT + license_file: LICENSE + summary: CuPy is an implementation of a NumPy-compatible multi-dimensional array on CUDA. + +extra: + recipe-maintainers: + - jakirkham diff --git a/recipes/cupy/run_test.py b/recipes/cupy/run_test.py new file mode 100644 index 0000000000000..5ebbf98f3964d --- /dev/null +++ b/recipes/cupy/run_test.py @@ -0,0 +1,19 @@ +# Configure CuPy to use 1 GPU for testing +import os +os.environ["CUPY_TEST_GPU_LIMIT"] = "1" + +# Check for CuPy (without importing) +import pkgutil +pkgutil.find_loader("cupy") + +# Try to import CuPy +import sys +try: + import cupy +except ImportError: + print("No GPU available. Exiting without running CuPy's tests.") + sys.exit(0) + +# Run CuPy's test suite +import py +py.test.cmdline.main(["tests/cupy_tests"])