Revert "[Precompile] Hook up backend="inductor" (#155387)"

This reverts commit 2c68c3e8d5e9a235f5861be6486de4959f80c840.

Reverted https://github.com/pytorch/pytorch/pull/155387 on behalf of https://github.com/atalman due to dynamo/test_precompile_context.py::PrecompileContextTests::test_basic [GH job link](https://github.com/pytorch/pytorch/actions/runs/15772892021/job/44464141039) [HUD commit link](2c68c3e8d5) ([comment](https://github.com/pytorch/pytorch/pull/155387#issuecomment-2992044073))
This commit is contained in:
PyTorch MergeBot
2025-06-20 15:30:04 +00:00
parent e1f28fe17b
commit edd45f3a02
10 changed files with 37 additions and 126 deletions

View File

@ -108,14 +108,8 @@ class PrecompileContext(CacheArtifactManager):
"mega" list
"""
artifact = CacheArtifactFactory.encode_create(artifact_type, key, content)
# TODO: although this covers completely same artifacts, it's possible
# with AOTAutogradCacheEntries to have multiple artifacts whose keys
# (i.e. backend_ids) are different, but whose contents are equal.
# In those cases, it would be much better if we only serialize once instead
# of N times.
if artifact in cls._seen_artifacts:
return
cls._new_cache_artifacts_by_key[key] = artifact
cls._seen_artifacts.add(artifact)