From b50e35cdb5e56b052e8819ced7049e2b7a4256e6 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 24 Oct 2019 18:02:06 -0400 Subject: [PATCH 1/4] recipes: Add CuPy --- recipes/cupy/meta.yaml | 59 ++++++++++++++++++++++++++++++++++++++++ recipes/cupy/run_test.py | 19 +++++++++++++ 2 files changed, 78 insertions(+) create mode 100755 recipes/cupy/meta.yaml create mode 100644 recipes/cupy/run_test.py 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"]) From d82b76648393d5e40b549ffe26d111381d2e3562 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 24 Oct 2019 18:02:08 -0400 Subject: [PATCH 2/4] Temporarily build on CUDA 9.2 in staged-recipes Changes the image to use the CUDA 9.2 Docker image and constrain the recipe to only build for CUDA 9.2. --- .azure-pipelines/azure-pipelines-linux.yml | 2 +- recipes/cupy/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 628d62c982ef0..10dafd2969c2f 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -7,7 +7,7 @@ jobs: matrix: linux: CONFIG: azure-linux-64-comp7 - IMAGE_NAME: condaforge/linux-anvil-comp7 + IMAGE_NAME: condaforge/linux-anvil-cuda:9.2 CF_MAX_PY_VER: 37 AZURE: True timeoutInMinutes: 360 diff --git a/recipes/cupy/meta.yaml b/recipes/cupy/meta.yaml index b7c30233c75bc..810171811ed7d 100755 --- a/recipes/cupy/meta.yaml +++ b/recipes/cupy/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - skip: True # [not (linux64 and cuda_compiler_version != "None")] + skip: True # [not (linux64 and cuda_compiler_version == "9.2")] script: "{{ PYTHON }} -m pip install . -vv" missing_dso_whitelist: - "*/libcuda.*" From 0bfa612db4e25cd408df36ec2f7eeb142443e7b4 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 25 Oct 2019 12:15:15 -0400 Subject: [PATCH 3/4] Revert "Temporarily build on CUDA 9.2 in staged-recipes" This reverts commit d82b76648393d5e40b549ffe26d111381d2e3562. --- .azure-pipelines/azure-pipelines-linux.yml | 2 +- recipes/cupy/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 10dafd2969c2f..628d62c982ef0 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -7,7 +7,7 @@ jobs: matrix: linux: CONFIG: azure-linux-64-comp7 - IMAGE_NAME: condaforge/linux-anvil-cuda:9.2 + IMAGE_NAME: condaforge/linux-anvil-comp7 CF_MAX_PY_VER: 37 AZURE: True timeoutInMinutes: 360 diff --git a/recipes/cupy/meta.yaml b/recipes/cupy/meta.yaml index 810171811ed7d..b7c30233c75bc 100755 --- a/recipes/cupy/meta.yaml +++ b/recipes/cupy/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - skip: True # [not (linux64 and cuda_compiler_version == "9.2")] + skip: True # [not (linux64 and cuda_compiler_version != "None")] script: "{{ PYTHON }} -m pip install . -vv" missing_dso_whitelist: - "*/libcuda.*" From 2d954f3bb09c79499ba89c2bfa1e1f929a9b558b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 25 Oct 2019 16:38:12 -0400 Subject: [PATCH 4/4] Add @leofang as a maintainer [ci skip] ***NO_CI*** --- recipes/cupy/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/cupy/meta.yaml b/recipes/cupy/meta.yaml index b7c30233c75bc..7bd4ebcf69146 100755 --- a/recipes/cupy/meta.yaml +++ b/recipes/cupy/meta.yaml @@ -57,3 +57,4 @@ about: extra: recipe-maintainers: - jakirkham + - leofang