Skip to content

Commit

Permalink
recipes: Add CuPy
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Oct 24, 2019
1 parent 7e4f964 commit b50e35c
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
59 changes: 59 additions & 0 deletions recipes/cupy/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions recipes/cupy/run_test.py
Original file line number Diff line number Diff line change
@@ -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"])

0 comments on commit b50e35c

Please sign in to comment.