This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Add OpExtension "SPV_INTEL_bfloat16_conversion"
ClosedPublic

Authored by mshahneo on Mar 28 2023, 2:19 PM.

Details

Summary

Add Intel-specific "SPV_INTEL_bfloat16_conversion" extension and
capability (Bfloat16ConversionINTEL), and
two ops (OpConvertFToBF16INTEL, OpConvertBF16ToFINTEL)
that are introduced by this extension.
These ops allow BF16 to Float conversion and vice-versa.

Reference Specification:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_bfloat16_conversion.asciidoc

Diff Detail

Event Timeline

mshahneo created this revision.Mar 28 2023, 2:19 PM
mshahneo requested review of this revision.Mar 28 2023, 2:19 PM
antiagainst requested changes to this revision.Mar 28 2023, 2:44 PM
antiagainst added inline comments.
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVIntelExtOps.td
41

This does not match with the assembly format?

48

The example does not match the assembly format in the following?

101

Same here. Need to update to match the assembly format.

mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
2213

Could you add negative tests triggering this in test/Dialect/SPIRV/IR?

This revision now requires changes to proceed.Mar 28 2023, 2:44 PM
mshahneo updated this revision to Diff 509844.Mar 30 2023, 4:03 PM

Add Negative test cases
Fix assembly format mismatch with the documentation example

Depends on D147087

mshahneo marked 4 inline comments as done.Mar 30 2023, 4:07 PM

Thank you so much for pointing out the issues.
Addressed them :).

antiagainst accepted this revision.Mar 30 2023, 4:29 PM
This revision is now accepted and ready to land.Mar 30 2023, 4:29 PM

Hi @antiagainst ,

Could you please help me commit the change, I do not have commit access.
Thank you so much in advance :).

Best Regards,
Abdullah

This revision was landed with ongoing or failed builds.Mar 31 2023, 2:12 PM
This revision was automatically updated to reflect the committed changes.

Hi @antiagainst ,

Could you please help me commit the change, I do not have commit access.
Thank you so much in advance :).

Best Regards,
Abdullah

Sure thing! Done.

Thank you so much :)