Allow Undefined to get kernel from Math/DefaultBackend. (#46352)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46352
Test Plan: Imported from OSS
Reviewed By: ezyang
Differential Revision: D24319417
Pulled By: ailzhang
fbshipit-source-id: de2d7db2cb931b0dcf2fbabd7d292e22cfc5e7b7