-
Notifications
You must be signed in to change notification settings - Fork 787
[ESIMD] Reduce number of bit-casts generated for lsc_block_load/store operations #8385
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
Conversation
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.
Looks good/correct. Thank you.
One comment for future changes in these functions:
It feels like it is possible to pass lsc_data_size::u32 and T=double and not get static verification/compilation error. This needs to be fixed.
Test failures are related to infrastructure, not the change |
This is true for all the lsc API we have, not just these functions so it is better be done as a separate item. |
@fineg74, I restarted pre-commit checks. OpenCL CPU and ESIMD emulator results were invalid due to infrastructure issue. Sorry for inconvenience. |
@@ -420,7 +419,12 @@ void __esimd_emu_lsc_offset_write( | |||
VecIdx += vectorIndexIncrement<N, _Transposed>()) { | |||
|
|||
if ((ByteDistance >= 0) && (ByteDistance < BufByteWidth)) { | |||
*((StoreType *)(WriteBase + ByteDistance)) = vals[VecIdx]; | |||
if constexpr (std::is_floating_point<Ty>::value) { | |||
*((StoreType *)(WriteBase + ByteDistance)) = |
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.
Can't this branch be used unconditionally: i.e. for if-then and if-else?
No description provided.