| 1164 | |
| 1165 | @dataclass(frozen=True) |
| 1166 | class 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) |
no outgoing calls
searching dependent graphs…