mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66109
This refactor is no longer necessary for ufunc codegen, as I changed
the format of ufuncs to not directly be inserted into the 'dispatch'
key, but I think the refactored code here is better. The basic concept
is to directly construct BackendMetadata as we are parsing entries of
the dispatch dictionary, rather than post facto creating them later.
This centralizes the compute and means that the creation of the backend index
is just a simple reindexing by operator name (nothing nontrivial).
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Reviewed By: bdhirsh
Differential Revision: D31385760
Pulled By: ezyang
fbshipit-source-id: 4fcb491ba025d2aa6fd356586b57affb97a507fc
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| api | ||
| dest | ||
| operator_versions | ||
| selective_build | ||
| __init__.py | ||
| code_template.py | ||
| context.py | ||
| gen_backend_stubs.py | ||
| gen_functionalization_type.py | ||
| gen_lazy_tensor.py | ||
| gen.py | ||
| local.py | ||
| model.py | ||
| utils.py | ||