lukeiwanski / tensorflow

OpenCL support for TensorFlow via SYCL
Apache License 2.0
65 stars 14 forks source link

[OpenCL] Fixes device path to name with many colons #123

Closed jwlawson closed 7 years ago

jwlawson commented 7 years ago

The device path is constructed from a device name by replacing all colons with underscores. Some device names contain more than one colon, for example device:SYCL:0 which gives a path device_SYCL_0. The previous code would not convert this back to the original device name, but rather to device:SYCL_0.

An alternative fix would be to convert all underscores to colons in the device name (i.e. remove the restriction inside replace("_", ":", 1) to just replace("_", ":")), however this would cause problems if there are any device names which are meant to contain underscores.

I'm not too sure what would be the best way of doing this.

jwlawson commented 7 years ago

This fixes test fails:

//tensorflow/python/debug:dumping_wrapper_test
//tensorflow/python/debug:local_cli_wrapper_test
//tensorflow/python/debug:source_utils_test

And partially fixes:

//tensorflow/python/debug:session_debug_file_test
//tensorflow/python/debug:analyzer_cli_test