Skip to content

Instantly share code, notes, and snippets.

@praeclarum
Last active April 3, 2018 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save praeclarum/3eb9678b67b6287b3b46b3d60435ad03 to your computer and use it in GitHub Desktop.
Save praeclarum/3eb9678b67b6287b3b46b3d60435ad03 to your computer and use it in GitHub Desktop.

iMac Pro PlaidML Training Perf

GPU vgg16 (batch size 8)

$ python plaidbench.py --train --batch-size 8 vgg16
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with vgg16, batch size 8
Loading CIFAR data
INFO:plaidml:Opening device "amd_radeon_pro_vega_56_compute_engine.0"
Model loaded.
Epoch 1/1
INFO:plaidml:Analyzing Ops: 85 of 483 operations complete
INFO:plaidml:Analyzing Ops: 205 of 483 operations complete
INFO:plaidml:Analyzing Ops: 223 of 483 operations complete
INFO:plaidml:Analyzing Ops: 230 of 483 operations complete
INFO:plaidml:Analyzing Ops: 243 of 483 operations complete
INFO:plaidml:Analyzing Ops: 256 of 483 operations complete
512/512 [==============================] - 62s - loss: 3.9266 - acc: 0.0918           
Epoch 1/1
512/512 [==============================] - 42s - loss: 2.1951 - acc: 0.2168     
Epoch 1/1
512/512 [==============================] - 42s - loss: 1.9290 - acc: 0.2930     
Epoch 1/1
512/512 [==============================] - 42s - loss: 1.7656 - acc: 0.3594     
Epoch 1/1
 80/512 [===>..........................] - ETA: 36s - loss: 1.7670 - acc: 0.3500

GPU vgg16 (batch size 1)

$ python plaidbench.py --train vgg16
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with vgg16, batch size 1
Loading CIFAR data
Downloading data from http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
170475520/170498071 [============================>.] - ETA: 0sINFO:plaidml:Opening device "amd_radeon_pro_vega_56_compute_engine.0"
Model loaded.
Epoch 1/1
INFO:plaidml:Analyzing Ops: 68 of 480 operations complete
INFO:plaidml:Analyzing Ops: 197 of 480 operations complete
INFO:plaidml:Analyzing Ops: 216 of 480 operations complete
INFO:plaidml:Analyzing Ops: 229 of 480 operations complete
INFO:plaidml:Analyzing Ops: 242 of 480 operations complete
INFO:plaidml:Analyzing Ops: 255 of 480 operations complete
512/512 [==============================] - 171s - loss: 4.5715 - acc: 0.0664          
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.6006 - acc: 0.1172         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.4337 - acc: 0.1133         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.3933 - acc: 0.1074         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.3757 - acc: 0.1094         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.3659 - acc: 0.1094         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.3598 - acc: 0.1094         
Epoch 1/1
512/512 [==============================] - 152s - loss: 2.3555 - acc: 0.1094         
Epoch 1/1
512/512 [==============================] - 153s - loss: 2.3524 - acc: 0.1094         
Epoch 1/1
 55/512 [==>...........................] - ETA: 136s - loss: 2.3760 - acc: 0.0364

Inference

CPU mobilenet

$ python plaidbench.py mobilenet
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with mobilenet, batch size 1
INFO:plaidml:Opening device "opencl_cpu.0"
Model loaded.
Example finished, elapsed: 0.999289989471 (compile), 75.6469585896 (execution), 0.0738739829976 (execution per example)
Correctness: FAIL, max_error: 0.00554675562307, max_abs_error: 0.000352203845978, fail_ratio: 0.076

GPU mobilenet

$ python plaidbench.py mobilenet
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with mobilenet, batch size 1
INFO:plaidml:Opening device "amd_radeon_pro_vega_56_compute_engine.0"
Model loaded.
Example finished, elapsed: 1.39863395691 (compile), 6.63612890244 (execution), 0.00648059463128 (execution per example)
Correctness: PASS, max_error: 1.92902371055e-05, max_abs_error: 1.01327896118e-06, fail_ratio: 0.0

CPU vgg16

$ python plaidbench.py vgg16
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with vgg16, batch size 1
INFO:plaidml:Opening device "opencl_cpu.0"
Model loaded.
INFO:plaidml:Analyzing Ops: 77 of 161 operations complete
Example finished, elapsed: 5.36628985405 (compile), 588.41653347 (execution), 0.574625520967 (execution per example)
Correctness: untested. Could not find golden data to compare against.

GPU vgg16

$ python plaidbench.py vgg16
/Users/fak/plaidml/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Running 1024 examples with vgg16, batch size 1
INFO:plaidml:Opening device "amd_radeon_pro_vega_56_compute_engine.0"
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5
553213952/553467096 [============================>.] - ETA: 0sModel loaded.
INFO:plaidml:Analyzing Ops: 77 of 161 operations complete
Example finished, elapsed: 4.51593494415 (compile), 27.925788641 (execution), 0.0272712779697 (execution per example)
Correctness: untested. Could not find golden data to compare against.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment