Skip to content

Commit 5536bf3

Browse files
committed
Set strict export explicitly for API change
1 parent 2898903 commit 5536bf3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/source/tutorials_source/pt2e_quant_x86_inductor.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ We will start by performing the necessary imports, capturing the FX Graph from t
104104
# Note: requires torch >= 2.6
105105
exported_model = export(
106106
model,
107-
example_inputs
107+
example_inputs,
108+
strict=True
108109
)
109110

110111

@@ -266,7 +267,7 @@ The PyTorch 2 Export QAT flow is largely similar to the PTQ flow:
266267
# Step 1. program capture
267268
# NOTE: this API will be updated to torch.export API in the future, but the captured
268269
# result shoud mostly stay the same
269-
exported_model = export(m, example_inputs)
270+
exported_model = export(m, example_inputs, strict=True)
270271
# we get a model with aten ops
271272
272273
# Step 2. quantization-aware training

docs/source/tutorials_source/pt2e_quant_xpu_inductor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ We will start by performing the necessary imports, capturing the FX Graph from t
8585
exported_model = export(
8686
model,
8787
example_inputs,
88+
strict=True
8889
).module()
8990

9091

0 commit comments

Comments
 (0)