Support void return type in TensorIteratorDynamicCasting checks. (#38815)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38815
Some CPU kernels have void return types and the currently implementation segfaults on these cases.
Test Plan: Imported from OSS
Differential Revision: D21670717
Pulled By: gchanan
fbshipit-source-id: bc17b8330195601ca231a985ee44319447ba6cf0