Open zap-wizard opened 4 years ago
And for some reason Tensorflow <-> nGraph <-> PlaidML is a lot slower than Keras <-> PlaidML on the device that works opencl_amd_radeon_pro_560_compute_engine.0
...
I'm not sure about that error, but I'm successfully using TF + Plaid + nGraph on an MBP (Catalina). What version of TF are you using there? Here's a recipe that works for me, with both TF 1.14 and 1.15:
virtualenv ve-plaidml
source ve-plaidml/bin/activate
pip install plaidml-keras
pip install tensorflow==1.14.0
pip install ngraph-tensorflow-bridge
import os;
import tensorflow as tf;
import ngraph_bridge;
print('TensorFlow version: ',tf.__version__);
print(ngraph_bridge.__version__)
os.environ['PLAIDML_EXPERIMENTAL'] = '1'
os.environ['PLAIDML_DEVICE_IDS'] = 'metal_amd_radeon_pro_5500m.0'
ngraph_bridge.set_backend('PLAIDML')
# Now you can use tf/ng like usual:
config = tf.ConfigProto(log_device_placement=True, allow_soft_placement=True)
config = ngraph_bridge.update_config(config)
If you add those plaid config statements to the start of the python example, any luck?
Thanks for help, but still not working. However I have figured out that there's only a few nn layers that are not working, because some of my models work correctly.
All devices do not work on PlaidML backend. However I have got the devices working on PlaidML with Keras (
plaidml-keras
), so I'm not really sure if the problem is in PlaidML or in nGraph...ngraph-bridge=0.22.0-rc4 PlaidML=0.6.4 MacOS High Sierra=10.13.6
Following tests are run with
mnist_deep_simplified.py
inexamples
.With device
metal_intel(r)_hd_graphics_unknown.0
got error:With device
metal_amd_radeon_pro_560.0
got error:With device
opencl_intel_hd_graphics_630.0
got error:However device
opencl_amd_radeon_pro_560_compute_engine.0
for some reason works fine: