MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _as_device_str_or_none

Function _as_device_str_or_none

tensorflow/python/framework/device_spec.py:39–44  ·  view source on GitHub ↗
(device_type)

Source from the content-addressed store, hash-verified

37
38
39def _as_device_str_or_none(device_type):
40 # For backwards compatibility only, we support lowercase variants of
41 # cpu and gpu but turn them into uppercase here.
42 if device_type in ("cpu", "gpu"):
43 return device_type.upper()
44 return _as_str_or_none(device_type)
45
46
47@tf_export("DeviceSpec", v1=[])

Callers 2

__init__Method · 0.85
device_typeMethod · 0.85

Calls 1

_as_str_or_noneFunction · 0.85

Tested by

no test coverage detected