diff --git a/deepmd/pt/model/model/sezm_model.py b/deepmd/pt/model/model/sezm_model.py index 91ff826a3e..7b2595a663 100644 --- a/deepmd/pt/model/model/sezm_model.py +++ b/deepmd/pt/model/model/sezm_model.py @@ -2370,11 +2370,13 @@ def compute_fn( # type: ignore[misc] def _inductor_inference_compiler( fx_gm: torch.fx.GraphModule, fx_inputs: list[Any] ) -> Any: + # This callback lowers the forward-only AOTAutograd inference + # graph (the eval branch below owns it; training compiles + # through the separate torch.compile branch above). # ``compile_options`` already includes ``triton.max_tiles=1`` - # from ``build_inductor_compile_options``, so the 1D launch-grid - # constraint applies to both the training and evaluation graphs. + # from ``build_inductor_compile_options``. with _ind_cfg.patch(compile_options): - return compile_fx_inner(fx_gm, fx_inputs) + return compile_fx_inner(fx_gm, fx_inputs, is_inference=True) # select_decomp_table keeps the decomposition set aligned with # Inductor's fallback set (a mismatch raises an aten._to_copy