-
Notifications
You must be signed in to change notification settings - Fork 788
[ESIMD] Fix an issue with copy_to that incorrectly copies char buffers in some circumstances #6298
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
The test that is supposed to verify this fix has failed here: http://llvm-ci-test2.intel.com:8080/blue/organizations/jenkins/SYCL_CI%2Fintel%2FLLVM_Test_Suite_Associate_CI/detail/LLVM_Test_Suite_Associate_CI/175/pipeline |
Vals.template select<4, 1>() = | ||
Tmp.template bit_cast_view<int32_t>().template select<4, 1>( | ||
NumChunks * ChunkSize); | ||
block_store<int32_t, 8>(reinterpret_cast<int32_t *>(Addr) + |
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.
How does this work? Vals has 8 int elements where the low 4 hold some useful values, while the upper 4 keep garbage, which is block_store'd to memory.
Looks like it writes to memory that is not supposed to be written, right?
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.
Fixed this and accessor version, added tests to test both versions
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.
It uses mask to exclude data that don't need to be copied.
/verify with intel/llvm-test-suite#1057 |
Seems to work now |
Remove special handling for accessor version as it is correctly handled.
/verify with intel/llvm-test-suite#1057 |
/verify with intel/llvm-test-suite#1057 |
1 similar comment
/verify with intel/llvm-test-suite#1057 |
This fix addresses an issue of incorrect handling of char buffers by copy_to function.
Complementary test PR intel/llvm-test-suite#1057