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

Method dispatchTable

torch/_python_dispatcher.py:171–181  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 """
170
171 def dispatchTable(self):
172 output = self._format_header("Computed Dispatch Table")
173 table = self.rawDispatchTable()
174 table_entries = table.split("\n")
175 regex = re.compile(r"registered at .*FallbackKernel\.cpp.*(\[)")
176 for line in table_entries:
177 k = line.split(":")[0]
178 if k in self.runtime_keys:
179 entry = regex.sub("[", line)
180 output += self._format_line(k, entry.split(": ")[1])
181 return output

Callers 4

test_basicMethod · 0.95
test_math_autogradcpuMethod · 0.95
test_autogradotherMethod · 0.95

Calls 6

_format_headerMethod · 0.95
rawDispatchTableMethod · 0.95
_format_lineMethod · 0.95
splitMethod · 0.45
compileMethod · 0.45
subMethod · 0.45

Tested by 4

test_basicMethod · 0.76
test_math_autogradcpuMethod · 0.76
test_autogradotherMethod · 0.76