plaidml


> virtualenv plaidml
> source plaidml/bin/activate
> pip install plaidml-keras plaidbench 
> plaidml-setup
PlaidML Setup (0.7.0)

Thanks for using PlaidML!

The feedback we have received from our users indicates an ever-increasing need
for performance, programmability, and portability. During the past few months,
we have been restructuring PlaidML to address those needs.  To make all the
changes we need to make while supporting our current user base, all development
of PlaidML has moved to a branch — plaidml-v1. We will continue to maintain and
support the master branch of PlaidML and the stable 0.7.0 release.

Read more here: https://github.com/plaidml/plaidml 

Some Notes:
  * Bugs and other issues: https://github.com/plaidml/plaidml/issues
  * Questions: https://stackoverflow.com/questions/tagged/plaidml
  * Say hello: https://groups.google.com/forum/#!forum/plaidml-dev
  * PlaidML is licensed under the Apache License 2.0
 

Default Config Devices:
   llvm_cpu.0 : CPU (via LLVM)
   metal_amd_radeon_hd_-_firepro_d700.1 : AMD Radeon HD - FirePro D700 (Metal)
   metal_amd_radeon_hd_-_firepro_d700.0 : AMD Radeon HD - FirePro D700 (Metal)

Experimental Config Devices:
   llvm_cpu.0 : CPU (via LLVM)
   opencl_amd_radeon_hd_-_firepro_d700_compute_engine.1 : AMD AMD Radeon HD - FirePro D700 Compute Engine (OpenCL)
   opencl_amd_radeon_hd_-_firepro_d700_compute_engine.0 : AMD AMD Radeon HD - FirePro D700 Compute Engine (OpenCL)
   metal_amd_radeon_hd_-_firepro_d700.1 : AMD Radeon HD - FirePro D700 (Metal)
   metal_amd_radeon_hd_-_firepro_d700.0 : AMD Radeon HD - FirePro D700 (Metal)

Using experimental devices can cause poor performance, crashes, and other nastiness.

Enable experimental device support? (y,n)[n]:y

Multiple devices detected (You can override by setting PLAIDML_DEVICE_IDS).
Please choose a default device:

   1 : llvm_cpu.0
   2 : opencl_amd_radeon_hd_-_firepro_d700_compute_engine.1
   3 : opencl_amd_radeon_hd_-_firepro_d700_compute_engine.0
   4 : metal_amd_radeon_hd_-_firepro_d700.1
   5 : metal_amd_radeon_hd_-_firepro_d700.0

Default device? (1,2,3,4,5)[1]:0
Invalid choice: 0

Default device? (1,2,3,4,5)[1]:1

Selected device:
    llvm_cpu.0

Almost done. Multiplying some matrices...
Tile code:
  function (B[X,Z], C[Z,Y]) -> (A) { A[x,y : X,Y] = +(B[x,z] * C[z,y]); }
Whew. That worked.

Save settings to /Users/taeylee/.plaidml? (y,n)[y]:y
Success!

> plaidbench keras mobilenet
Running 1024 examples with mobilenet, batch size 1, on backend plaid
INFO:plaidml:Opening device "llvm_cpu.0"
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.6/mobilenet_1_0_224_tf.h5
17227776/17225924 [==============================] - 3s 0us/step
Compiling network... Warming up... Running...
Example finished, elapsed: 4.677s (compile), 95.086s (execution)

-----------------------------------------------------------------------------------------
Network Name         Inference Latency         Time / FPS          
-----------------------------------------------------------------------------------------
mobilenet            92.86 ms                  87.92 ms / 11.37 fps
Correctness: PASS, max_error: 2.0418785425135866e-05, max_abs_error: 1.5869736671447754e-06, fail_ratio: 0.0


Running 1024 examples with mobilenet, batch size 1, on backend plaid
INFO:plaidml:Opening device "metal_amd_radeon_hd_-_firepro_d700.0"
Compiling network... Warming up... Running...
Example finished, elapsed: 0.637s (compile), 10.064s (execution)

-----------------------------------------------------------------------------------------
Network Name         Inference Latency         Time / FPS          
-----------------------------------------------------------------------------------------
mobilenet            9.83 ms                   0.00 ms / 1000000000.00 fps
Correctness: PASS, max_error: 1.681717185419984e-05, max_abs_error: 7.674098014831543e-07, fail_ratio: 0.0