Enable registering stackbased kernels with lambdas (#26658)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26658
By SFINAE'ing the lambda registration to only kernels that aren't stackbased kernels,
an attempt to register a stackbased lambda kernel will correctly fallback to the stackbased registration function and work as expected.
ghstack-source-id: 90610843
Test Plan: unit tests
Differential Revision: D17533871
fbshipit-source-id: 1bfe3106b0576d46798a51bdaa5b7b5508164766