Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/memory_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def device_name(self):
return 'CPU'
elif self.device_type == DeviceType.CUDA:
return 'GPU{}'.format(self.device_id)
elif self.device_type is not None:
return self.device_type.name
else:
return None

Expand Down
21 changes: 20 additions & 1 deletion tb_plugin/torch_tb_profiler/profiler/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,26 @@

class DeviceType(IntEnum):
CPU = 0
CUDA = 1
CUDA = 1 # CUDA.
MKLDNN = 2 # Reserved for explicit MKLDNN
OPENGL = 3 # OpenGL
OPENCL = 4 # OpenCL
IDEEP = 5 # IDEEP.
HIP = 6 # AMD HIP
FPGA = 7 # FPGA
MAIA = 8 # ONNX Runtime / Microsoft
XLA = 9 # XLA / TPU
Vulkan = 10 # Vulkan
Metal = 11 # Metal
XPU = 12 # XPU
MPS = 13 # MPS
Meta = 14 # Meta (tensors with no data)
HPU = 15 # HPU / HABANA
VE = 16 # SX-Aurora / NEC
Lazy = 17 # Lazy Tensors
IPU = 18 # Graphcore IPU
MTIA = 19 # Meta training and inference devices
PrivateUse1 = 20 # PrivateUse1 device


class EventTypes:
Expand Down