MCPcopy Create free account
hub / github.com/pytorch/tutorials / custom_op_meta

Function custom_op_meta

intermediate_source/torch_export_tutorial.py:803–805  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

801
802@custom_op.register_fake
803def custom_op_meta(x):
804 # Returns an empty tensor with the same shape as the expected output
805 return torch.empty_like(x)
806
807######################################################################
808# Here is an example of exporting a program with the custom op.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected