Hi,
I am using a machine with Intel Gen9 GPU and have been following the steps listed at “https://developer.codeplay.com/products/computecpp/ce/guides/tensorflow-guide/tensorflow-generic-setup”. Everything seems to be setup fine with clinfo showing “UNTESTED”. There is a section which describes how to run benchmarks and I wanted to run the existing benchmark tool (in tensorflow/tensorflow/tools/benchmark) on the GPU.
The command listed in the README is:
bazel-bin/tensorflow/tools/benchmark/benchmark_model
–graph=tensorflow_inception_graph.pb
–input_layer=“input:0”
–input_layer_shape=“1,224,224,3”
–input_layer_type=“float”
–output_layer=“output:0”
but this defaults to the CPU. Is there a command to run this on the GPU ?
-Darren
1 Like
We’re just checking this out with those benchmarks. In the meantime can you try something simpler like this to see if it runs correctly on the GPU?
bazel test --test_lang_filters=cc,py --test_timeout 1500 --verbose_failures -c opt --config=sycl – //tensorflow/python/kernel_tests:conv_ops_test
Hi Darren,
Those benchmarks that you linked to won’t run with SYCL currently, the information in those benchmarks focuses on Android and from an initial look there is nothing about running on GPU on a desktop machine. I’d suggest that you run the benchmarks we describe in the guide on our website. Was there something specific in the other benchmarks that you wanted to try and run, a particular operation?
Hi Rod,
The benchmark runs on an Ubuntu machine (CPU) using the command described in the last section of the README. The reason we were looking to run it was that it provides model profiling data - operator-wise timing and we were looking to get this on the GPU. Is it possible to modify the benchmark to run on the GPU with SYCL; if yes, can you guide on the changes that would be needed to do this.
-Darren
Hi Darren,
It’s not easy to get GPU profiling data. Assuming the Android benchmarks run on the GPU, the profiling data that TensorFlow returns would only be about the host so you wouldn’t know how long a GPU kernel took (which I assume is what you are interested in).
If the host information is what you are looking for, the benchmarks we link to also provide host profiling data with the “–trace_file traces.json” option. This file can be opened in chrome://tracing/.
If you want gpu profiling data you would need to use a third party tool like CodeXL or https://github.com/intel/opencl-intercept-layer.
If you are interested in trying to modify this benchmark to run with SYCL devices take a look at https://github.com/codeplaysoftware/tensorflow/blob/master/tensorflow/cc/tutorials/example_trainer.cc to see how to use the GPU. Generally replace “GPU:0” with “SYCL:0” and adapt https://github.com/codeplaysoftware/tensorflow/blob/master/tensorflow/tools/benchmark/benchmark_model.cc to do the same.