-
Notifications
You must be signed in to change notification settings - Fork 151
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
Compiler FE: Providing optimization group options #5784
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Options can be categorized like below. from b346889 Based on FusingFuseActivationFunction Replace, SubstituteReplaceMulAddWithDepthwiseConv RemoveRemoveFakeQuant Constant foldingFoldAddV2 Value modificationMakeBatchNormGammaPositive Need user decisionShuffleWeightTo16x1Float32 How about this? O1Fusing O2O1 + Value modification |
Seems OK at first look :)
|
@mhs4670go In #5784 (comment), I think ForwardReshapeToUnaryOp can be enabled by default, but it is not constant folding (this helps RemoveRedundantReshape) IMHO The below passes should not be enabled by default, because they are not always beneficial. FusePreActivationBatchNorm - Not used due to low quantization accuracy ReplaceMulAddWithDepthwiseConv - Backend specific (useful when we have a premature backend) |
@jinevening Thank you for comment. I've applied your comment. from b346889 Based on FusingFuseActivationFunction Replace, SubstituteReplaceMulAddWithDepthwiseConv RemoveRemoveFakeQuant Constant foldingFoldAddV2 Value modificationExpandBroadcastConst O1Fusing
|
FYI, in case of gcc, as a convention that is already widely used -O, -O1
-O2
-O0
|
IMHO, all ReplaceMulAddWithDepthwiseConv - Backend specific (useful when we have a premature backend) |
@jinevening Then, I'll make them O2. Actually, all replaced ops can be backend specific. |
Original from #5780 (comment)
As a suggestion, what if we provide the
-O1
,-O2
, and-O3
options like c compiler?As you might expect, it's kind of a group of optimization options. Probably the most stable optimizations are reflected in
-O1
, the slightly challenging ones in-O2
, and the risky, perhaps current--all
items are reflected through-O3
. Of course, the configuration of the options in this group can be changed at any time at our discretion, so users can use it without confusion. The long format of this option would be around--optimization-level={1,2,3}
.In addition, options such as
-O4
or--experimental
could be added.The text was updated successfully, but these errors were encountered: