# # TensorFlow v1.14.1 for AMD APU, gfx902 family # # Use with the ROCm files on Bruhnspace's rocm-apu repo. # IT WILL NOT WORK WITH AMD ROCm repository that lacks APU support. # # (c) Bruhnspace AB 2019. # contact at bruhnspace.com # # Test log. 1)Install ROCm 2.6 APU from Bruhnspace's rocm-apu repo for Ubuntu 18.04.3 or newer with hardware enablement stack (Kernel 5.0) 2) Install the TensorFlow APU (gfx902) wheel built and optimized for (znver1, Zen CPU architecture) and gfx902 support. $ pip3 install tensorflow-1.14.1-cp36-cp36m-linux_x86_64.whl Processing ./tensorflow-1.14.1-cp36-cp36m-linux_x86_64.whl … … … Installing collected packages: numpy, six, h5py, keras-applications, tensorflow-estimator, termcolor, wheel, grpcio, absl-py, gast, keras-preprocessing, werkzeug, setuptools, markdown, protobuf, tensorboard, wrapt, google-pasta, astor, tensorflow Successfully installed absl-py-0.8.0 astor-0.8.0 gast-0.2.2 google-pasta-0.1.7 grpcio-1.23.0 h5py-2.9.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 numpy-1.17.1 protobuf-3.9.1 setuptools-41.2.0 six-1.12.0 tensorboard-1.14.0 tensorflow-1.14.1 tensorflow-estimator-1.14.0 termcolor-1.1.0 werkzeug-0.15.5 wheel-0.33.6 wrapt-1.11.2 3) Test TensorFlow APU $ python3 >>> import tensorflow as tf >>> tf.enable_eager_execution() >>> tf.add(1, 2).numpy() 2019-08-28 20:13:45.804371: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libhip_hcc.so 2019-08-28 20:13:45.839899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1651] Found device 0 with properties: name: AMD Ryzen Embedded V1605B with Radeon Vega Gfx AMDGPU ISA: gfx902 memoryClockRate (GHz) 1.1 pciBusID 0000:03:00.0 2019-08-28 20:13:45.891047: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library librocblas.so 2019-08-28 20:13:45.902443: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libMIOpen.so 2019-08-28 20:13:45.908757: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library librocfft.so 2019-08-28 20:13:45.913872: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library librocrand.so 2019-08-28 20:13:45.913990: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0 2019-08-28 20:13:45.932033: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1597090000 Hz 2019-08-28 20:13:45.932617: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x14ff7c0 executing computations on platform Host. Devices: 2019-08-28 20:13:45.932807: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1651] Found device 0 with properties: name: AMD Ryzen Embedded V1605B with Radeon Vega Gfx AMDGPU ISA: gfx902 memoryClockRate (GHz) 1.1 pciBusID 0000:03:00.0 2019-08-28 20:13:45.932923: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0 2019-08-28 20:13:45.932999: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-08-28 20:13:45.933137: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3539 MB memory) -> physical GPU (device: 0, name: AMD Ryzen Embedded V1605B with Radeon Vega Gfx, pci bus id: 0000:03:00.0) 2019-08-28 20:13:45.934922: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x59486f0 executing computations on platform ROCM. Devices: 2019-08-28 20:13:45.934950: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): AMD Ryzen Embedded V1605B with Radeon Vega Gfx, AMDGPU ISA version: gfx902 3 <-- CORRECT RESPONSE >>> hello = tf.constant('TF for AMD APU BY BRUHNSPACE!') >>> hello.numpy() b'TF for AMD APU BY BRUHNSPACE!' >>> exit()