mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-14 06:27:45 +08:00
[None] [AutoDeploy] canonicalize_graph before shape prop for consistent state_dict (#7223)
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
This commit is contained in:
parent
bf1b958f1a
commit
97d550b4ba
@ -326,6 +326,7 @@ class BaseTransform(ABC):
|
||||
|
||||
# check if run cleanup depending on the config and info
|
||||
if self.config.requires_shape_prop and not has_valid_shapes:
|
||||
canonicalize_graph(gm)
|
||||
with lift_to_meta(gm):
|
||||
canonicalize_graph(gm, shape_prop=True)
|
||||
is_clean = True
|
||||
@ -351,6 +352,7 @@ class BaseTransform(ABC):
|
||||
|
||||
# check if run cleanup depending on the config and info
|
||||
if self.config.run_shape_prop and not (info.is_clean and info.has_valid_shapes):
|
||||
canonicalize_graph(gm)
|
||||
with lift_to_meta(gm):
|
||||
canonicalize_graph(gm, shape_prop=True)
|
||||
elif self.config.run_graph_cleanup and not info.is_clean:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user