-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
adds TPU to CI. #981
adds TPU to CI. #981
Conversation
First pass will fail since there are no marked tests. Do you want a silly test to satisfy CI or do we have some small but useful test we'd like to write? |
@erip yes, we recently made |
Excellent! I also foresee the |
@erip just noticed on my desktop, this xla image is 17.9GB :( |
So I noticed... GitHub actions died from lack of space. 😄 |
@erip otherwise, can you try just to install everything manually with conda env like this
and then setup somewhere their env vars to use CPU EDIT: THIS WONT WORK |
I checked the content of |
@erip you can install ## Install conda env for python 3.6 (xla works on 3.6 only)
conda create -y -n py36 python=3.6
conda activate py36
## Install gsutil
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
apt-get install -y apt-transport-https ca-certificates gnupg curl
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
apt-get update && apt-get install -y google-cloud-sdk
## Install openblas and mkl
apt-get install -y libopenblas-dev
conda install -y mkl
## Download torch & xla
gsutil cp gs://tpu-pytorch/wheels/torch-1.5-cp36-cp36m-linux_x86_64.whl .
gsutil cp gs://tpu-pytorch/wheels/torch_xla-1.5-cp36-cp36m-linux_x86_64.whl .
## Install torch & xla
pip install torch-1.5-cp36-cp36m-linux_x86_64.whl
pip install torch_xla-1.5-cp36-cp36m-linux_x86_64.whl
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/pkgs/mkl-2020.0-166/lib/
export XRT_DEVICE_MAP="CPU:0;/job:localservice/replica:0/task:0/device:XLA_CPU:0"
export XRT_WORKERS="localservice:0;grpc://localhost:40934" to check if everything is OK python -c "import torch_xla; print(torch_xla.__version__)" |
It kind of looks like the TPU action isn't being trigged on force pushes... I'll take a look at that in the morning, but it's probably something to do with the |
@erip I made some changes since your last commit. It installs a usable torch xla: |
Since this PR only adds CI and a simple test (w/o new functionality), I don't think there are any documentation things required. WDYT @vfdev-5? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @erip !
Fixes #963
Description: Adds TPU test runner.
Check list: