Skip to content

Commit

Permalink
Update dim in named attrs of concat op (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
meenakshiramanathan1 authored Nov 13, 2024
1 parent 1f38fd4 commit 1bee7d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 5 additions & 1 deletion forge/csrc/passes/commute_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,11 @@ bool commute_through_concat(
concat_golden_transform.attr[concat_dim >= 0 ? concat_dim : concat_dim + concat_golden_transform.attr.size()] =
concat_output_len;
op->add_golden_transform(concat_golden_transform);
op->overwrite_op_attrs(attr);
std::vector<graphlib::OpType::Attr> concat_attr;
concat_attr.push_back(new_dim);
graphlib::OpType::Attrs named_attrs;
named_attrs["dim"] = new_dim;
op->change_op_type(graphlib::OpType("concatenate", concat_attr, {}, named_attrs));

*commute_shape = concat_shape;
*golden_transform = concat_golden_transform;
Expand Down
4 changes: 0 additions & 4 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_dla.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
def test_dla_pytorch(variant, test_device):
# Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
if variant in ("dla102", "dla102x", "dla102x2", "dla169"):
compiler_cfg.compile_depth = forge.CompileDepth.FINISH_COMPILE
else:
compiler_cfg.compile_depth = forge.CompileDepth.SPLIT_GRAPH
func = variants_func[variant]

# Load data sample
Expand Down

0 comments on commit 1bee7d0

Please sign in to comment.