-
Notifications
You must be signed in to change notification settings - Fork 247
[DOC] Specify FP8 representation #3221
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sidorov, Dmitry <[email protected]>
|
@svenvh please take a look if such representation makes sense |
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.
Left some initial thoughts and nits.
|
@Keenuts @michalpaszkowski please also take a look as I plan to introduce the extension to the SPIR-V backend as well, and contact for the frontends should be identical for both SPIR-V generators. Remaining TODOs:
|
Shoud this be an RFC in discourse since it's about how to represent something in the LLVM IR? |
Sure, I can open one.
SPV_EXT_float8 specification allows to have conversion instructions and LLVM won't allow to have target extension type input to
Kind of. For all of the instructions, with an exception of conversions and cooperative-matrix related instructions, it's fine to leave the value be i8. For conversions and matrices - we can insert a bitcast right before (and after if necessary) the use of fp8 value. In this case we won't actually scavenge any type information before lowering to SPIR-V and it won't introduce extra complexity for lowering (apart of necessity to de-mangle the builtins). I actually have an internal implementation for this, just need to make it 'open-source ready' (but it doesn't mean, that I'm not open to change it - I'm keen to adjust it according to the feedback I can get here or elsewhere). |
Way it's implemented is described in: KhronosGroup#3221 Currently only conversion instructions (and internal builtins) are covered. TODO: add packed int4 conversion tests and saturation declration handling. Signed-off-by: Sidorov, Dmitry <[email protected]>
Way it's implemented is described in: KhronosGroup#3221 Currently only conversion instructions (and internal builtins) are covered. TODO: add packed int4 conversion tests and saturation declration handling. Signed-off-by: Sidorov, Dmitry <[email protected]>
Way it's implemented is described in: KhronosGroup#3221 Currently only conversion instructions (and internal builtins) are covered. TODO: add packed int4 conversion tests and saturation declration handling. Signed-off-by: Sidorov, Dmitry <[email protected]>
Way they are implemented is described in: KhronosGroup#3221 The PR also adds SPV_EXT_float8 extension and packed conversions for SPV_INTEL_int4 Currently only conversion instructions (and internal builtins) are covered. TODO: in the following PR Saturation decoration will be added. Signed-off-by: Sidorov, Dmitry <[email protected]>
Way they are implemented is described in: KhronosGroup#3221 The PR also adds SPV_EXT_float8 extension and packed conversions for SPV_INTEL_int4 Currently only conversion instructions (and internal builtins) are covered. TODO: in the following PR Saturation decoration will be added. Signed-off-by: Sidorov, Dmitry <[email protected]>
Way they are implemented is described in: #3221 The PR also adds SPV_EXT_float8 extension and packed conversions for SPV_INTEL_int4 Currently only conversion instructions (and internal builtins) are covered. TODO: in the following PR Saturation decoration will be added. Signed-off-by: Sidorov, Dmitry <[email protected]> --------- Signed-off-by: Sidorov, Dmitry <[email protected]>
Extension spec: KhronosGroup/SPIRV-Registry#343