Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[one-cmds] Add substitute_expand_dims_to_reshape to one command #14205

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/one-cmds/how-to-use-one-commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Current transformation options are
to net of builtin operators.
- shuffle_weight_to_16x1float32 : This will convert weight format of FullyConnected to SHUFFLED16x1FLOAT32.
Note that it only converts weights whose row is a multiple of 16.
- substitute_expand_dims_to_reshape : This will convert ExpandDims with constant axis to Reshape.
- substitute_pack_to_reshape : This will convert single input Pack to Reshape.
- substitute_padv2_to_pad : This will convert certain condition PadV2 to Pad.
- substitute_splitv_to_split : This will convert certain condition SplitV to Split.
Expand Down
3 changes: 3 additions & 0 deletions compiler/one-cmds/onelib/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class CONSTANT:
'resolve_customop_matmul',
'resolve_customop_max_pool_with_argmax',
'resolve_customop_splitv',
'substitute_expand_dims_to_reshape',
'substitute_pack_to_reshape',
'substitute_padv2_to_pad',
'substitute_splitv_to_split',
Expand Down Expand Up @@ -179,6 +180,8 @@ class CONSTANT:
('shuffle_weight_to_16x1float32',
'convert weight format of FullyConnected op to SHUFFLED16x1FLOAT32.'
' Note that it only converts weights whose row is a multiple of 16'),
('substitute_expand_dims_to_reshape',
'convert ExpandDims with constant axis to Reshape op'),
('substitute_pack_to_reshape', 'convert single input Pack op to Reshape op'),
('substitute_padv2_to_pad', 'convert certain condition PadV2 to Pad'),
('substitute_splitv_to_split', 'convert certain condition SplitV to Split'),
Expand Down