Skip to content

Commit

Permalink
Fix torch._inductor.aoti_compile_and_package input
Browse files Browse the repository at this point in the history
Summary:
The inputs to `torch._inductor.aoti_compile_and_package` changed in pytorch/pytorch#140991.

The `args` and `kwargs` do not need to be inputed anymore. The API will get them from `exported_program.example_inputs`

Differential Revision: D67436429
  • Loading branch information
yushangdi authored and facebook-github-bot committed Dec 19, 2024
1 parent 7d07409 commit 0a16dde
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def test_llama3_2_text_decoder_aoti(self) -> None:
with tempfile.TemporaryDirectory() as tmpdir:
path = torch._inductor.aoti_compile_and_package(
ep,
model.get_example_inputs(),
kwargs=model.get_example_kwarg_inputs(),
package_path=os.path.join(tmpdir, "text_decoder.pt2"),
)
encoder_aoti = torch._inductor.aoti_load_package(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def test_flamingo_vision_encoder(self) -> None:
with tempfile.TemporaryDirectory() as tmpdir:
path = torch._inductor.aoti_compile_and_package(
ep,
model.get_example_inputs(),
package_path=os.path.join(tmpdir, "vision_encoder.pt2"),
)
print(path)
Expand Down
1 change: 0 additions & 1 deletion extension/llm/modules/test/test_position_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def test_tiled_token_positional_embedding_aoti(self):
with tempfile.TemporaryDirectory() as tmpdir:
path = torch._inductor.aoti_compile_and_package(
tpe_ep,
(self.x, self.aspect_ratio),
package_path=os.path.join(tmpdir, "tpe.pt2"),
)
tpe_aoti = load_package(path)
Expand Down

0 comments on commit 0a16dde

Please sign in to comment.