MCPcopy Create free account
hub / github.com/pytorch/pytorch / BackendMetadata

Class BackendMetadata

torchgen/model.py:1166–1185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164
1165@dataclass(frozen=True)
1166class BackendMetadata:
1167 # The name of the backend kernel, for a given operator
1168 # for in-tree backends. These names come directly from the 'dispatch" field
1169 # in native_functions.yaml. The dispatch entry is optional; in that
1170 # case, that is equivalent to having written:
1171 #
1172 # dispatch:
1173 # CompositeImplicitAutograd: $operator_name
1174 kernel: str
1175 # Whether or not the operator has a structured kernel implemented, for this particular backend.
1176 # For in-tree backends, they all have the same value for structured- this is listed
1177 # in native_functions.yaml.
1178 # However, external backends like XLA can indendently toggle which ops are structured.
1179 structured: bool
1180
1181 # The namespace for kernels, default value: DEFAULT_KERNEL_NAMESPACE
1182 cpp_namespace: str
1183
1184 def supports_symint(self) -> bool:
1185 return "_symint" in self.kernel
1186
1187
1188@dataclass(frozen=True)

Callers 6

setUpMethod · 0.90
create_backend_indexFunction · 0.90
generate_functionFunction · 0.90
parse_from_yamlFunction · 0.90
_to_backend_indexMethod · 0.90
from_yamlMethod · 0.85

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…