Skip to content

Instantly share code, notes, and snippets.

$ python3 tools/amd_build/build_caffe2_amd.py
/home/rocm-user/pytorch/caffe2/mpi/mpi_gpu_test.cc
[--------------------] 0% /home/rocm-user/pytorch/caffe2/db/create_db_op_gpu.cc
[--------------------] 1% /home/rocm-user/pytorch/caffe2/utils/math_gpu_test.cc
[--------------------] 1% /home/rocm-user/pytorch/caffe2/contrib/nervana/nervana_fc_op_gpu_test.cc
[--------------------] 2% /home/rocm-user/pytorch/caffe2/queue/queue_ops_gpu.cc
[--------------------] 2% /home/rocm-user/pytorch/caffe2/core/context_gpu_test.cc
[#-------------------] 3% /home/rocm-user/pytorch/caffe2/core/operator_gpu_test.cc
[#-------------------] 3% /home/rocm-user/pytorch/caffe2/core/blob_gpu_test.cc
[#-------------------] 4% /home/rocm-user/pytorch/caffe2/core/THCCachingAllocator_gpu.h
@briansp2020
briansp2020 / gist:114bd75ff0182197cf7efc7af265e89c
Created October 10, 2018 13:06
ROCM PyTorch using docker
$ docker build .
Sending build context to Docker daemon 6.753MB
Step 1/17 : FROM ubuntu:16.04
16.04: Pulling from library/ubuntu
3b37166ec614: Pull complete
504facff238f: Pull complete
ebbcacd28e10: Pull complete
c7fb3351ecad: Pull complete
2e3debadcbf7: Pull complete
Digest: sha256:45ddfa61744947b0b8f7f20b8de70cbcdd441a6a0532f791fd4c09f5e491a8eb
@briansp2020
briansp2020 / gist:05ee51232b1bfae6d1e123db74ae8389
Created September 28, 2018 04:11
ROCm Tensorflow 1.10 problem
:~$ python
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
2018-05-22 03:48:25.326959: I tensorflow/core/common_runtime/gpu/gpu_device.cc:907] Found device 0 with properties:
name: Device 6863
AMDGPU ISA: gfx900
memoryClockRate (GHz) 1.6
pciBusID 0000:03:00.0
Total memory: 15.98GiB
Free memory: 15.73GiB
2018-05-22 03:48:25.326977: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] DMA: 0
2018-05-22 03:48:25.326983: I tensorflow/core/common_runtime/gpu/gpu_device.cc:939] 0: Y
2018-05-22 03:48:25.326990: I tensorflow/core/common_runtime/gpu/gpu_device.cc:997] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Device 6863, pci bus id: 0000:03:00.0)
root@C-c6fe3f8f-7781-431b-9423-4071ddb07676-146:~/git/Mask_RCNN# python NucleiExperiment.py
Using TensorFlow backend.
Downloading pretrained model to /root/git/Mask_RCNN/mask_rcnn_coco.h5 ...
... done downloading pretrained model!
ROOT_DIR : /root/git/Mask_RCNN
MODEL_DIR : /root/git/Mask_RCNN/logs
COCO_MODEL_PATH : /root/git/Mask_RCNN/mask_rcnn_coco.h5
Configurations:
BACKBONE resnet101
root@C-c6fe3f8f-7781-431b-9423-4071ddb07676-146:~/git/Mask_RCNN/samples/shapes# export
declare -x HCC_HOME="/opt/rocm/hcc"
declare -x HIP_PATH="/opt/rocm/hip"
declare -x HIP_VISIBLE_DEVICES="0"
declare -x HOME="/root"
declare -x HSA_ENABLE_SDMA="0"
declare -x LANG="en_US.UTF-8"
declare -x LC_ALL="en_US.UTF-8"
declare -x LC_CTYPE="en_US.UTF-8"
declare -x LD_LIBRARY=":/opt/rocm/opencl/lib/x86_64"
briansp@Ryzen1800X:~/git/keras-rcnn$ python setup.py build
running build
running build_py
briansp@Ryzen1800X:~/git/keras-rcnn$ python setup.py install
running install
running bdist_egg
running egg_info
writing keras_rcnn.egg-info/PKG-INFO
writing dependency_links to keras_rcnn.egg-info/dependency_links.txt
writing requirements to keras_rcnn.egg-info/requires.txt
-[0000:00]-+-00.0
+-01.0-[01]--+-00.0
| \-00.1
+-14.0
+-16.0
+-17.0
+-1b.0-[02]--
+-1c.0-[03]--
+-1c.2-[04-05]----00.0-[05]--
+-1c.3-[06]----00.0
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
Subsystem: ASUSTeK Computer Inc. Device 8694
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=10 <?>
Kernel driver in use: skl_uncore
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00: 86 80 1f 19 06 00 90 20 07 00 00 06 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 94 86
30: 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00
40: 01 90 d1 fe 00 00 00 00 01 00 d1 fe 00 00 00 00
50: 03 00 00 00 29 00 00 00 04 00 00 00 01 00 c0 a7
60: 05 00 00 f8 00 00 00 00 01 80 d1 fe 00 00 00 00
70: 00 00 00 ff 03 00 00 00 00 0c 00 ff 7f 00 00 00
80: 11 00 00 00 00 11 11 00 1a 00 00 00 00 00 00 00