-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Enable new FP16 and support mixed precision by MO #8514
Conversation
ec7b8b4
to
5aa4471
Compare
79a3084
to
d3e3ce5
Compare
51dea7e
to
aa7e390
Compare
@vinograd47 @ArtemySkrebkov-intel @AntonDudchenko please take a closer look. It may have a critical impact on vpu functionality |
Because of replacements on MO side this PR have a lot of changes. To better review it, please look into separate commits. |
model-optimizer/unit_tests/extensions/back/ChangeOutputTypeAttributes_test.py
Outdated
Show resolved
Hide resolved
Can you please generate a package of IR using this PR for us to test? |
1b1cfcd
to
1fed674
Compare
1fed674
to
0fa00ae
Compare
c615c84
to
911e569
Compare
a2be70b
to
3543894
Compare
Please fix a bug exposed in e2e. I will run one more DLB run on weekend:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix failure. Also, I need to review these changes one more time.
src/common/transformations/src/transformations/common_optimizations/common_optimizations.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree with these changes regarding "Replace usage of np.array to mo_array which forces fp32 dtype if no dtype was passed in MO". Please revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please apply comments
if in_type_1 in [np.float16, np.float32, np.float64] and in_type_0 != in_type_1 and in_node_1.op == 'Const': | ||
in_node_1 = node.in_port(1).get_source().node | ||
log.error("Changing Const node '{}' data type from {} to {} for Convolution operation".format( | ||
in_node_1.soft_get('name', in_node_1.id), in_type_1, in_type_0), | ||
extra={'is_warning': True}) | ||
convert_const_node_value_type(in_node_1, in_type_0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What cases exactly does this logic cover? input and weight types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks great. Remained some comments not so relevant now if we get normal DLB results. Let's anticipate DLB and merge if it is fine.
* Enable new FP16 format and support mixed precision * Apply review comments * Fix issue with fp64 in FakeQuantWithMinMaxVars.py * Enabme decompression converts fusing for CPU plugin * Apply review feedback * Fix code style * Fix issue with np.full and apply review feedback * Apply review feedback * Fix HardSigmoid onnx extractor * Replace np.arrays that were skipped with mo_array * Fix compress_quantized_weights_test.py * Fix import issues * Apply review feedback and fix type of fusing linops in MO * Apply review feedback * Fix types for Mean/Scales and MXNET zeros * Add RandomUniform_8 to ConvertPrecision * Fix merge issue * Fix consts names collision in GPU plugin
Details:
Tickets: