[inductor] Fix flaky tests in test_memory_planning.py (#131703)

Summary: Internally, the ABI-compatible mode is [enabled by default](eb54ca7abe/torch/_inductor/config.py (L53)). As a result, when the `abi_compatible: False` flag is not specified explitictly in the tests assuming non-ABI-compatible C++ codegen, those are failing internally. Here we fix one such test in `test_memory_planning.py`.

Test Plan: Tested internally.

Differential Revision: D60197327

Pull Request resolved: https://github.com/pytorch/pytorch/pull/131703
Approved by: https://github.com/eellison
This commit is contained in:
Adnan Akhundov
2024-07-25 05:09:08 +00:00
committed by PyTorch MergeBot
parent 35bb0d3638
commit ceab3121de

View File

@ -65,7 +65,7 @@ class TestMemoryPlanning(TestCase):
def test_cpp_wrapper(self):
f, args = self._generate(device="cuda")
compiled = torch.compile(f, dynamic=True)
with config.patch("cpp_wrapper", True):
with config.patch({"cpp_wrapper": True, "abi_compatible": False}):
result, code = run_and_get_cpp_code(compiled, *args)
FileCheck().check(