Skip to content

Instantly share code, notes, and snippets.

# This dockerfile is meant to be personalized, and serves as a template and demonstration.
# Modify it directly, but it is recommended to copy this dockerfile into a new build context (directory),
# modify to taste and modify docker-compose.yml.template to build and run it.
# It is recommended to control docker containers through 'docker-compose' https://docs.docker.com/compose/
# Docker compose depends on a .yml file to control container sets
# rocm-setup.sh can generate a useful docker-compose .yml file
# `docker-compose run --rm <rocm-terminal>`
# If it is desired to run the container manually through the docker command-line, the following is an example
Excluding c10d on ROCm
Excluding cpp_extensions on ROCm
Excluding distributed on ROCm
Excluding multiprocessing on ROCm
Excluding nccl on ROCm
Excluding thd_distributed on ROCm
Selected tests: autograd, cuda, cuda_primary_ctx, dataloader, distributions, expecttest, indexing, jit, nn, numba_integration, optim, sparse, torch, type_info, utils
Running test_autograd ...
test___getitem__ (__main__.TestAutograd) ... ok
test___getitem___adv_index (__main__.TestAutograd) ... ok
Building wheel torch-1.0.0a0+664d8cd
running install
setup.py::run()
running build_deps
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x '' ']'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
# PYTORCH_TEST_WITH_ROCM=1 python test/run_test.py --verbose
Excluding c10d on ROCm
Excluding cpp_extensions on ROCm
Excluding distributed on ROCm
Excluding distributions on ROCm
Excluding multiprocessing on ROCm
Excluding nccl on ROCm
Excluding thd_distributed on ROCm
Excluding utils on ROCm
Selected tests: autograd, cuda, cuda_primary_ctx, dataloader, expecttest, indexing, jit, nn, numba_integration, optim, sparse, torch, type_info
# PYTORCH_TEST_WITH_ROCM=1 python test/run_test.py --verbose
Excluding c10d on ROCm
Excluding cpp_extensions on ROCm
Excluding distributed on ROCm
Excluding distributions on ROCm
Excluding multiprocessing on ROCm
Excluding nccl on ROCm
Excluding thd_distributed on ROCm
Excluding utils on ROCm
Selected tests: autograd, cuda, cuda_primary_ctx, dataloader, expecttest, indexing, jit, nn, numba_integration, optim, sparse, torch, type_info
root@Ryzen1800X:~/pytorch/test# python run_test.py
Running test_autograd ...
............................................................................................s..................................### HCC STATUS_CHECK Error: HSA_STATUS_ERROR_INVALID_ISA (0x100f) at file:mcwamp_hsa.cpp line:1156
Traceback (most recent call last):
File "run_test.py", line 391, in <module>
main()
File "run_test.py", line 383, in main
raise RuntimeError(message)
RuntimeError: test_autograd failed! Received signal: SIGIOT
root@Ryzen1800X:~/pytorch/test# python test_torch.py
drun -v ~/:/root/briansp -v /tmp/ramdisk:/root/input --ipc=host bsp2020/pytorch /bin/bash
# Setup environment variables (put them in .bashrc)
alias jupyter='jupyter notebook --allow-root --ip=0.0.0.0'
export KMTHINLTO="1" LANG="C.UTF-8" LC_ALL="C.UTF-8"
# Update rocm_agent_enumerator
cp ~/briansp/Downloads/rocm_agent_enumerator.txt /opt/rocm/bin/rocm_agent_enumerator
# Remove hip-thrust and install from git
apt purge hip-thrust
@briansp2020
briansp2020 / gist:159742c61da5bb205b7214ac980ff092
Created October 11, 2018 11:00
Building PyTorch in ROCm:TensorFlow docker container
# USE_ROCM=1 MAX_JOBS=16 python3 setup.py install --user
Building wheel torch-1.0.0a0+8516a28
running install
setup.py::run()
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x /usr/bin/rsync ']'
+ SYNC_COMMAND='rsync -lptgoD'
@briansp2020
briansp2020 / gist:52047cf73d8d59ddd72f730d779b952c
Created October 10, 2018 13:40
PyTorch in ROCm/TensorFlow Docker.
# dpkg -i ~/briansp/Downloads/rocsparse-0.1.3.1-Linux.deb
Selecting previously unselected package rocsparse.
(Reading database ... 44441 files and directories currently installed.)
Preparing to unpack .../rocsparse-0.1.3.1-Linux.deb ...
Unpacking rocsparse (0.1.3.1) ...
Setting up rocsparse (0.1.3.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
root@Ryzen1800X:/root/pytorch# USE_ROCM=1 MAX_JOBS=8 python3 setup.py install --user
Building wheel torch-1.0.0a0+2203cd8
running install
@briansp2020
briansp2020 / gist:2a109c0f1d40b45299cb73a76a255767
Created October 10, 2018 13:28
ROCM/Tensorflow + PyTorch
# dpkg -i ~/briansp/Downloads/Pytorch_Docker/installers/*
(Reading database ... 44441 files and directories currently installed.)
Preparing to unpack .../hcsparse-master-d7aadff-Linux.deb ...
Unpacking hcsparse (0.1.1) over (0.1.1) ...
Preparing to unpack .../rocrand-1.8.1-Linux.deb ...
Unpacking rocrand (1.8.1) over (1.8.1) ...
Setting up hcsparse (0.1.1) ...
Setting up rocrand (1.8.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
root@Ryzen1800X:/root/pytorch# USE_ROCM=1 MAX_JOBS=8 python3 setup.py install --user