Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CuPy #9959

Merged
merged 4 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions recipes/cupy/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{% 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")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using De Morgan's Laws, this skip statement could be made easier to read:

[(not linux64) or cuda_compiler_version == "None"]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A PR to the feedstock would be welcome. 🙂

ref: https://github.com/conda-forge/cupy-feedstock

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
- leofang
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"])