Skip to content

Commit 7b86dc3

Browse files
authored
Bump PT pin to 20241028 (#1419)
* Bump PT pin to 20241014 * Push bump to 1028 and add migration to export_for_training
1 parent 4fdbe10 commit 7b86dc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

install/install_requirements.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ echo "Using pip executable: $PIP_EXECUTABLE"
6262
# NOTE: If a newly-fetched version of the executorch repo changes the value of
6363
# PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary
6464
# package versions.
65-
PYTORCH_NIGHTLY_VERSION=dev20241013
65+
PYTORCH_NIGHTLY_VERSION=dev20241028
6666

6767
# Nightly version for torchvision
68-
VISION_NIGHTLY_VERSION=dev20241013
68+
VISION_NIGHTLY_VERSION=dev20241028
6969

7070
# Nightly version for torchtune
7171
TUNE_NIGHTLY_VERSION=dev20241013

torchchat/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def export_for_server(
122122
from executorch.exir.tracer import Value
123123

124124
from torch._export import capture_pre_autograd_graph
125-
from torch.export import export, ExportedProgram
125+
from torch.export import export, export_for_training, ExportedProgram
126126

127127
from torchchat.model import apply_rotary_emb, Attention
128128
from torchchat.utils.build_utils import get_precision
@@ -238,7 +238,7 @@ def _to_core_aten(
238238
raise ValueError(
239239
f"Expected passed in model to be an instance of fx.GraphModule, got {type(model)}"
240240
)
241-
core_aten_ep = export(model, example_inputs, dynamic_shapes=dynamic_shapes)
241+
core_aten_ep = export_for_training(model, example_inputs, dynamic_shapes=dynamic_shapes)
242242
if verbose:
243243
logging.info(f"Core ATen graph:\n{core_aten_ep.graph}")
244244
return core_aten_ep

0 commit comments

Comments
 (0)