From 083e6cd3458024cf0331ba69ea1cafa0c53ebf97 Mon Sep 17 00:00:00 2001 From: saienduri Date: Tue, 6 Aug 2024 12:44:55 -0700 Subject: [PATCH] add warning Signed-off-by: saienduri --- shark_turbine/aot/exporter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shark_turbine/aot/exporter.py b/shark_turbine/aot/exporter.py index e8e9220e..9c9af26e 100644 --- a/shark_turbine/aot/exporter.py +++ b/shark_turbine/aot/exporter.py @@ -252,6 +252,12 @@ def export( ) ) + if not strict_export: + warnings.warn( + "When strict_export == False, Python interpreter is used and code will execute exactly as it would in eager mode. " + "Therefore, graph optimizations and safety are not garaunteed to be at the same level as TorchDynamo." + ) + TransformedModule: Any current_decomps = decompositions.current_aot_decompositions() if isinstance(mdl, torch.export.ExportedProgram):