[SYCL] Implement sycl_ext_oneapi_fp8 for CRI#21568
Conversation
|
@intel/llvm-reviewers-runtime please, review |
There was a problem hiding this comment.
Pull request overview
This PR introduces initial host-side implementations of OneAPI experimental FP8 types (E4M3, E5M2, E8M0) and adds unit tests validating conversions/encodings plus tests that verify the expected SPIR-V builtin call paths (via mocks) for device-only code paths.
Changes:
- Added
sycl::ext::oneapi::experimentalFP8 type definitions and conversion logic in a new public header. - Added unit tests for value/encoding behavior for fp8 E4M3, E5M2, and E8M0 on CPU.
- Added mocked builtin implementations and tests to confirm which builtins are invoked from constructors/conversions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
sycl/include/sycl/ext/oneapi/experimental/float_8bit/types.hpp |
Adds the FP8 type implementations, conversion helpers, and builtin hooks. |
sycl/unittests/Extensions/fp8/fp8_e4m3.cpp |
Adds host unit tests for E4M3 encoding/conversion behavior. |
sycl/unittests/Extensions/fp8/fp8_e5m2.cpp |
Adds host unit tests for E5M2 encoding/conversion behavior. |
sycl/unittests/Extensions/fp8/fp8_e8m0.cpp |
Adds host unit tests for E8M0 encoding/conversion behavior. |
sycl/unittests/Extensions/fp8/builtin_mocks.hpp |
Provides mock builtin symbols and counters to validate builtin call paths. |
sycl/unittests/Extensions/fp8/builtin_call_tests.cpp |
Adds tests asserting the expected builtin calls occur (via the mocks). |
sycl/unittests/Extensions/fp8/CMakeLists.txt |
Registers the new FP8 unit test target and sources. |
sycl/unittests/Extensions/CMakeLists.txt |
Adds the new fp8 unit test subdirectory to the Extensions suite. |
gmlueck
left a comment
There was a problem hiding this comment.
Here are my comments so far. I haven't looked at E8M0 yet, or at any of the CPU conversions.
|
@dklochkov-emb can you please provide status for all failed fp8-related tests in pre-commit? BTW, I restarted some of the checks due to CI issue, so need to wait a bit for the completion. |
|
@intel/llvm-gatekeepers please consider merging |
|
@intel/llvm-gatekeepers Please, merge it |
|
@dklochkov-emb We are seeing postcommit CI failures in https://github.com/intel/llvm/actions/runs/27421671974/job/81048588785 Can you please fix ASAP and if not possible revert? Thanks |
This PR adds FP8 types for CRI docs.
It adds the first part which includes: