MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / __io_tensor_check_and_gen

Method __io_tensor_check_and_gen

python/oneflow/nn/graph/proxy.py:393–410  ·  view source on GitHub ↗
(self, item, io_type, name)

Source from the content-addressed store, hash-verified

391 return mapped_args, mapped_kwargs
392
393 def __io_tensor_check_and_gen(self, item, io_type, name):
394 assert io_type in ("input", "output")
395 if isinstance(item, Tensor):
396 repr_str = (
397 "(" + io_type.upper() + ":" + name + ":" + item._meta_repr() + ")"
398 )
399 return True, repr_str
400 else:
401 repr_str = (
402 "[WARNING]("
403 + io_type.upper()
404 + ":"
405 + name
406 + ":"
407 + str(type(item))
408 + ")"
409 )
410 return False, repr_str
411
412 def __members(self, get_members_fn, recurse=True) -> Iterator["Proxy"]:
413 assert self.to(GraphModule)._type == GraphBlockType.MODULE

Callers 1

leaf_node_fnMethod · 0.95

Calls 2

typeEnum · 0.85
upperMethod · 0.45

Tested by

no test coverage detected