Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 if the machine supports sse41 while not supporting avx2? This case jit_mode gets false. sse41 can't be utilized.
I think the original code here is right. Please also refer to the following comment: #580 (comment)
Thanks Yury!
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.
Thanks, @xuchen-intel, I agree, that such solution seems to be a workaround, but we still have to fix original bug in sse4.2 case. I found it located in reduce_main() and reduce_tail() functions, but still cannot found the separate 'illegal instruction'. May be, it doesn't connected with specific operator itself. Have you any ideas?
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.
I couldn't reproduce this problem with CPU-test. It passes on no-AVX2 machine.
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.
Thanks Yury! If you've already been working on the JIT details, maybe you can try to reproduce this problem by changing the following code.
openvino/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp
Line 1528 in 76131da
Remove the condition branch of avx512 and avx2, so that it will be forced to utilize sse4.2 instruction.
Anyway, I'm OK with the workaround. And you can always to assign the issue to me, if you come across any problem.
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.
I tried to remove those conditions. It doesn't helps, so I have had to reproduce the problem with no-AVX machine via benchmark_app and GNMT model. Solution with additional
(mayiuse(cpu::x64::avx2))
works good. I tried to reproduce it in special test for reduce_node to reassign it reasonably, but without result.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.
Anyway, thanks for advice. I'll consult with our team about acceptability of workaround in given case.