MCPcopy Create free account
hub / github.com/pytorch/executorch / get_kernels

Method get_kernels

codegen/model.py:147–158  ·  view source on GitHub ↗
(
        self, g: NativeFunction | NativeFunctionsGroup
    )

Source from the content-addressed store, hash-verified

145 return m is not None
146
147 def get_kernels(
148 self, g: NativeFunction | NativeFunctionsGroup
149 ) -> dict[ETKernelKey, BackendMetadata]:
150 if isinstance(g, NativeFunction):
151 f = g
152 elif isinstance(g, NativeFunctionsGroup):
153 f = g.functional
154 else:
155 assert_never(g)
156 if f.func.name not in self.index:
157 return {}
158 return self.index[f.func.name]
159
160 @staticmethod
161 def grow_from_backend_indices(

Callers 4

has_kernelsMethod · 0.95
gen_unboxingFunction · 0.80
get_ns_grouped_kernelsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected