mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
add python API to print all operators that have kernels registered to a particular DispatchKey (#63575)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63575 Test Plan: Imported from OSS Reviewed By: ezyang, Chillee Differential Revision: D30426919 Pulled By: bdhirsh fbshipit-source-id: b0e487e48dfe02f7b9d678403f0a2b5bfe146f4e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9324d682fd
commit
bcc6e3ab5e
@ -786,6 +786,12 @@ CPU: registered at {}:5 :: () -> () [ boxed unboxed ]
|
||||
'''.format(extension_path),
|
||||
impls[0])
|
||||
|
||||
def test_dispatch_print_registrations_for_dispatch_key_invalid(self):
|
||||
with self.assertRaisesRegex(
|
||||
RuntimeError,
|
||||
"could not parse dispatch key: invalid_key"):
|
||||
C._dispatch_print_registrations_for_dispatch_key('invalid_key')
|
||||
|
||||
class TestPythonDispatcher(TestCase):
|
||||
def test_basic(self):
|
||||
dispatcher = PythonDispatcher()
|
||||
|
Reference in New Issue
Block a user