MCPcopy Create free account
hub / github.com/PythonOT/POT / device_type

Method device_type

ot/backend.py:2354–2355  ·  view source on GitHub ↗
(self, type_as)

Source from the content-addressed store, hash-verified

2352 return torch.finfo(type_as.dtype).bits
2353
2354 def device_type(self, type_as):
2355 return type_as.device.type.replace("cuda", "gpu").upper()
2356
2357 def _bench(self, callable, *args, n_runs=1, warmup_runs=1):
2358 results = dict()

Callers 5

seedMethod · 0.95
randMethod · 0.95
randnMethod · 0.95
randpermMethod · 0.95
_benchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected