We are running Profiler + TB for our custom backend using PrivateUse1 as device. The profiler has DeviceType as 20 as per pytorch code .
TB memory profiler sets and uses the device_name, but only checks for DeviceTypes (CPU and CUDA) and returns None for anything else. This throws this error and is not able to display memory in TensorBoard.
File "...venv/lib/python3.10/site-packages/torch_tb_profiler/run.py", line 292, in get_memory_curve
devices: List[str] = sorted(list(curves.keys()))
TypeError: '<' not supported between instances of 'str' and 'NoneType'
Proposing that we map the DeviceTypes as per Pytorch and change the device_name function to print the type as name.
Another option is to use the deviceProperties json field (device_props variable) to allow the user to specify the name they want.
I can raise a PR with these changes.
We are running Profiler + TB for our custom backend using PrivateUse1 as device. The profiler has DeviceType as 20 as per pytorch code .
TB memory profiler sets and uses the
device_name, but only checks for DeviceTypes (CPU and CUDA) and returns None for anything else. This throws this error and is not able to display memory in TensorBoard.Proposing that we map the DeviceTypes as per Pytorch and change the
device_namefunction to print the type as name.Another option is to use the
devicePropertiesjson field (device_propsvariable) to allow the user to specify the name they want.I can raise a PR with these changes.