forked from plaidml/plaidml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (51 loc) · 1.94 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
language: python
dist: xenial
cache:
directories:
- /home/travis/
matrix:
include:
- python: "2.7"
env:
- BZL_PY_VER=PY2
- PLAIDML_EXPERIMENTAL=1
- PLAIDML_DEVICE_IDS=opencl_cpu.0
- python: "3.6"
env:
- BZL_PY_VER=PY3
- PLAIDML_EXPERIMENTAL=1
- PLAIDML_DEVICE_IDS=opencl_cpu.0
before_install:
- sudo apt-get install g++ wget -y
- wget https://storage.googleapis.com/external_build_repo/opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
- wget https://github.com/bazelbuild/bazel/releases/download/0.19.2/bazel-0.19.2-installer-linux-x86_64.sh
# Conda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda env create -n plaidml
- source activate plaidml
# OpenCL
- tar xzf opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
- pushd opencl_runtime_16.1.2_x64_rh_6.4.0.37
- sudo ./install.sh --cli-mode --silent ../tools/intel-ocl-silent
- popd
- conda install tensorflow theano setuptools h5py click
- git clone http://github.com/plaidml/plaidbench
# Bazel
- chmod +x bazel-0.19.2-installer-linux-x86_64.sh
- ./bazel-0.19.2-installer-linux-x86_64.sh --user
- export PATH=$HOME/bin:$PATH
install:
- bazel build --config=linux_x86_64 --build_tag_filters=-llvm --force_python=$BZL_PY_VER plaidml:wheel plaidml/keras:wheel
- pip install bazel-bin/plaidml/*whl bazel-bin/plaidml/keras/*whl
script:
- bazel test --config=linux_x86_64 --force_python=$BZL_PY_VER --test_env=PLAIDML_EXPERIMENTAL=1 --test_env=PLAIDML_DEVICE_IDS=opencl_cpu.0 plaidml/keras:backend_test
- python plaidbench/plaidbench.py mobilenet