Skip to content

Commit 08f4334

Browse files
Reza Rahimifacebook-github-bot
authored andcommitted
Fix constant propagation pass to consider kwargs (pytorch#4166)
Summary: Pull Request resolved: pytorch#4166 Reviewed By: cccclai, mcremon-meta Differential Revision: D59345251 fbshipit-source-id: b371df5a24ffdbba2cff2967094860b5b1756b93
1 parent d159de2 commit 08f4334

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exir/passes/constant_prop_pass.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7+
# pyre-unsafe
8+
79
from collections import OrderedDict
810
from typing import cast, Mapping, Optional
911

@@ -126,6 +128,10 @@ def get_propagated_const_tensor_dict(
126128
node.args,
127129
exported_program,
128130
const_node_to_tensor,
131+
) or not is_const(
132+
node.kwargs,
133+
exported_program,
134+
const_node_to_tensor,
129135
):
130136
continue
131137

0 commit comments

Comments
 (0)