cpu: x64 brgemm: fix for destination data check #4504
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.
Backport of fix to rls-v3.10.
This fixes issue that brgemm will return unsupported when a post op results in a u8 or s8 data type for float16 and bfloat16 brgemm calculations.
This issue was reported in responce to earlyer fix that was published to catch unsupported data types.
The added check did not account for the fact that post ops could result in the destination data type being u8 or s8.
u8 and s8 has been added as a valid destination data type for float16 and bfloat16 brgemm operations. Only bf16 models are known to be affected by this issue.
this was validatated using the sde and following benchdnn tests.
benchdnn --brgemm --dt=bf16:bf16:u8 --attr-scales=dst:common:0.05 32x32:32x32
benchdnn --brgemm --dt=bf16:bf16:s8 --attr-scales=dst:common:0.05 32x32:32x32
benchdnn --brgemm --dt=f16:f16:u8 --attr-scales=dst:common:0.05 32x32:32x32
benchdnn --brgemm --dt=f16:f16:s8 --attr-scales=dst:common:0.05 32x32:32x32
this should resolve an issue reported by the OpenVINO team related to post-step affecting some known models.
see PR#4497 pr that was backported
see PR#3887 original fix for MFDNN-13836
to see original fix for MFDNN-13836