CUDAのインストール

Python CUDA on MacBookPro

CUDA関連の環境変数の設定 (plist)


CuPy?のインストール

$ git clone https://github.com/cupy/cupy.git
$ cd cupy
$ git checkout v4.2.0
$ python setup.py clean
$ MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install
$ pip install .
Processing /Users/atsushi/PycharmProjects/cupy
Requirement already satisfied: numpy>=1.9.0 in /Users/atsushi/.pyenv/versions/anaconda3-5.1.0/envs/jupyter-env/lib/python3.6/site-packages (from cupy==4.2.0) (1.14.3)
Requirement already satisfied: six>=1.9.0 in /Users/atsushi/.pyenv/versions/anaconda3-5.1.0/envs/jupyter-env/lib/python3.6/site-packages (from cupy==4.2.0) (1.11.0)
Requirement already satisfied: fastrlock>=0.3 in /Users/atsushi/.pyenv/versions/anaconda3-5.1.0/envs/jupyter-env/lib/python3.6/site-packages (from cupy==4.2.0) (0.3)
Building wheels for collected packages: cupy
  Running setup.py bdist_wheel for cupy ... done
  Stored in directory: /private/var/folders/cm/p00lclws0jxdmjlb89qyqq580000gn/T/pip-ephem-wheel-cache-47vpnvhd/wheels/f3/4b/b6/cf3092440fb9ebf35bfb25a4de43ee2a9609fae446258288e9
Successfully built cupy
Installing collected packages: cupy
  Found existing installation: cupy 4.2.0
    Uninstalling cupy-4.2.0:
      Successfully uninstalled cupy-4.2.0
Successfully installed cupy-4.2.0

なんか動いた

import cupy as cp
a = cp.array([1,2,3,4,5])
b = cp.array([6,7,8,9,10])
c = a + b
print (c)
[ 7  9 11 13 15]

Python


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2018-10-09 (火) 00:16:12 (36d)
ISBN10
ISBN13
9784061426061