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 23, 2019
1 parent 75311a5 commit a1784b5
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes/cupy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

export NCCL_LIB_DIR="${PREFIX}/lib"
export NCCL_INCLUDE_DIR="${PREFIX}/include"
export NVVMIR_LIBRARY_DIR="${CUDA_HOME}/nvvm/libdevice"

python -m pip install . -vv
4 changes: 4 additions & 0 deletions recipes/cupy/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cudnn:
- 7.3
nccl:
- 2.4.6.1
65 changes: 65 additions & 0 deletions recipes/cupy/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{% set name = "cupy" %}
{% set version = "6.4.0" %}
{% set sha256 = "ca70ca0823323f8c91d52eb304009eaa72feb44118864c1f00d8fa288352dc88" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}

build:
number: 0
skip: True # [not (linux64 and cuda_compiler_version != "None")]
ignore_run_exports:
- fastrlock
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
- {{ pin_compatible("cudnn") }}
- fastrlock >=0.3
- numpy >=1.9.0
- six >=1.9.0

# Requires a GPU to import (loads libcuda)
#test:
# imports:
# - cupy
# requires:
# - pytest
# - mock
# source_files:
# - tests
# commands:
# - CUPY_TEST_GPU_LIMIT=1 python -m pytest tests/cupy_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
3 changes: 3 additions & 0 deletions recipes/cupy/run_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Check for CuPy (without importing)
import pkgutil
pkgutil.find_loader("cupy")

0 comments on commit a1784b5

Please sign in to comment.