Skip to content

Commit f450d8d

Browse files
yushangdifacebook-github-bot
authored andcommitted
Fix torch._inductor.aoti_compile_and_package input (#7400)
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
1 parent c337bef commit f450d8d

File tree

6 files changed

+4
-8
lines changed

6 files changed

+4
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19eff28ff3f19b50da46f5a9ff5f4d4d213806fe
1+
288aa873831057b1eb7d747914ec4fdc76c23a80

examples/models/llama3_2_vision/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
NIGHTLY_VERSION="dev20241112"
8+
NIGHTLY_VERSION="dev20241218"
99

1010
# Install torchtune nightly for model definitions.
1111
pip install --pre torchtune==0.4.0.${NIGHTLY_VERSION} --extra-index-url https://download.pytorch.org/whl/nightly/cpu --no-cache-dir

examples/models/llama3_2_vision/text_decoder/test/test_text_decoder.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ def test_llama3_2_text_decoder_aoti(self) -> None:
7474
with tempfile.TemporaryDirectory() as tmpdir:
7575
path = torch._inductor.aoti_compile_and_package(
7676
ep,
77-
model.get_example_inputs(),
78-
kwargs=model.get_example_kwarg_inputs(),
7977
package_path=os.path.join(tmpdir, "text_decoder.pt2"),
8078
)
8179
encoder_aoti = torch._inductor.aoti_load_package(path)

examples/models/llama3_2_vision/vision_encoder/test/test_vision_encoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def test_flamingo_vision_encoder(self) -> None:
3636
with tempfile.TemporaryDirectory() as tmpdir:
3737
path = torch._inductor.aoti_compile_and_package(
3838
ep,
39-
model.get_example_inputs(),
4039
package_path=os.path.join(tmpdir, "vision_encoder.pt2"),
4140
)
4241
print(path)

extension/llm/modules/test/test_position_embeddings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def test_tiled_token_positional_embedding_aoti(self):
177177
with tempfile.TemporaryDirectory() as tmpdir:
178178
path = torch._inductor.aoti_compile_and_package(
179179
tpe_ep,
180-
(self.x, self.aspect_ratio),
181180
package_path=os.path.join(tmpdir, "tpe.pt2"),
182181
)
183182
tpe_aoti = load_package(path)

install_requirements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def python_is_compatible():
112112
# NOTE: If a newly-fetched version of the executorch repo changes the value of
113113
# NIGHTLY_VERSION, you should re-run this script to install the necessary
114114
# package versions.
115-
NIGHTLY_VERSION = "dev20241112"
115+
NIGHTLY_VERSION = "dev20241218"
116116

117117
# The pip repository that hosts nightly torch packages.
118118
TORCH_NIGHTLY_URL = "https://download.pytorch.org/whl/nightly/cpu"
@@ -124,7 +124,7 @@ def python_is_compatible():
124124
# been installed on CI before this step, so pip won't reinstall them
125125
f"torch==2.6.0.{NIGHTLY_VERSION}" if USE_PYTORCH_NIGHTLY else "torch",
126126
(
127-
f"torchvision==0.20.0.{NIGHTLY_VERSION}"
127+
f"torchvision==0.22.0.{NIGHTLY_VERSION}"
128128
if USE_PYTORCH_NIGHTLY
129129
else "torchvision"
130130
), # For testing.

0 commit comments

Comments
 (0)