# PyTorch AMD APU family gfx801 (Carrizo, Bristol Ridge) and gfx902 (Raven) # using Bruhnspace APU rocm repository. # # # Install $ sudo apt install git python3-pip libopenblas-dev cmake libnuma-dev autoconf build-essential \ ca-certificates curl libgoogle-glog-dev libhiredis-dev libleveldb-dev liblmdb-dev \ libopencv-dev libpthread-stubs0-dev libsnappy-dev sudo vim libprotobuf-dev protobuf-compiler \ python3-opencv $ pip3 install enum34 numpy pyyaml setuptools typing cffi future hypothesis $ pip3 install torch-1.3.0a0+e8acc2e-cp36-cp36m-linux_x86_64.whl # Test $ python3 -c 'import torch; print(torch.__version__)' 1.3.0a0+e8acc2e $ pip3 install --no-deps torchvision $ python3 -c "import torch;print('CUDA(hip) is available',torch.cuda.is_available());print('cuda(hip)_device_num:',torch.cuda.device_count());print('Radeon device:',torch.cuda.get_device_name(torch.cuda.current_device()))" CUDA(hip) is available True cuda(hip)_device_num: 1 Radeon device: AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G $ python3 -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure" Success