Updated DispatchKeyExtractor to expect TensorOptions (#30981)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30981
This stack is a first step toward an effort to fix, clean up and simplify code generation logic. �Please see the master [task](https://github.com/pytorch/pytorch/issues/30405) to see related discussions and all the known issues.
Main focus of these changes is TensorOptions in code generation.
Goals:
- Remove TensorOptions from generated code wherever it's possible. Leave it only in python/C++ API layers.
- Refactor TensorOptions logic to a single place.
- Log all discovered issues.
Non goals:
- Fix Everything!
- Remove all the hacks in code generation scripts.
- Clean up and defector all code generation scripts.
-----------
In this PR:
Extended DispatchKeyExtractor logic to expect TensorOptions.
-----------
Test Plan: Imported from OSS
Differential Revision: D18912684
Pulled By: izdeby
fbshipit-source-id: 25cf1c397caa14272ca65b4003f1f03ff282ea77