MCPcopy Create free account
hub / github.com/apple/axlearn / as_local_tensor

Function as_local_tensor

axlearn/common/test_utils.py:130–133  ·  view source on GitHub ↗
(x: Tensor)

Source from the content-addressed store, hash-verified

128
129
130def as_local_tensor(x: Tensor) -> NestedTensor:
131 if isinstance(x, Tensor):
132 return x
133 raise NotImplementedError(f"{type(x)}: {x}")
134
135
136def clean_hlo(hlo: str) -> str:

Callers 1

assertNestedAllCloseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected