1from torchgen.model import NativeFunctionsGroup 2 3 4# Follows dispatcher calling convention, but: 5# - Mutable arguments not allowed. Meta functions are always 6# written in functional form. Look at FunctionSchema.signature() 7# - No tensor returns; instead we return a TensorMeta describing 8# the tensor in question 9 10 11def name(g: NativeFunctionsGroup) -> str: 12 # use the overload name from the functional version 13 return str(g.functional.func.name).replace(".", "_") 14