-
Notifications
You must be signed in to change notification settings - Fork 745
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
[SYCL] Add a regression test for the crash during spec constants processing #1536
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.
Please add a clang lit test for this that validates what the IR should look like in this case.
This ends up likely being solved in the SemaSYCL rewrite but I'd like to accept some sort of this fix with some good validation tests.
Rewrite here: #1517 |
I would suggest "rewriting" the test. I.e. removing the existing test from the runtime library project. |
Do I really need to validate the IR if purpose of this patch is to fix a crash? |
Where exactly do you suggest to move the test? |
No. |
You seems to fix Sema component, so it should be in clang/test/Sema* |
Yes, if the problem is that the parameters aren't being passed correctly, which causes the crash. We want our tests fine grained so that they can catch issues like this in the future while still being easy to reproduce. |
I think that problem is not that the parameters are being passed incorrectly. This PR fixes the crash in the Sema itself (in the same method). Without the fix I've got an out of boundary access at line 703 here llvm/clang/lib/Sema/SemaSYCL.cpp Lines 701 to 707 in 6c88351
|
e9c8acf
to
4878084
Compare
4878084
to
db74bf0
Compare
Thank you all for your review. I think I have resolved all your comments with my latest commit. |
Please, mark resolved comments using "Resolve conversation" button. |
db74bf0
to
adc06b2
Compare
adc06b2
to
3fef4c1
Compare
@AlexeySotkin, I just merged PR conflicting with these changes. Could you resolve the merge conflicts, please? |
Hopefully the solution to it is simply to 'delete' the changes in this patch in SemaSYCL and make sure that the tests still pass. If not, @Fznamznon and I can help. |
Clang used to crash in case SYCL kernel captures a specialization constant before an accessor. The tests checks that the crash is fixed. Signed-off-by: Alexey Sotkin <alexey.sotkin@intel.com>
915ac0e
3fef4c1
to
915ac0e
Compare
I have rebased my patch on top of the sycl branch. And now it seems that the test pass without my changes to the Clang. Honestly, I don't see much sense in this PR anymore |
We still need the test. |
I would still like to have the test, if we broke it once, I can see us breaking it again. As I mentioned in my first response, I anticipated that this would be the case. |
…_docs * origin/sycl: [XPTI][Framework] Reference implementation of the Xpti framework to be used with instrumentation in SYCL (intel#1557) [SYCL] Initial ABI checks implementation (intel#1528) [SYCL] Support connection with multiple plugins (intel#1490) [SYCL] Add a new header file with the reduction class definition (intel#1558) [SYCL] Add test for SYCL kernels with accessor and spec constant (intel#1536)
…versioning * origin/sycl: [XPTI][Framework] Reference implementation of the Xpti framework to be used with instrumentation in SYCL (intel#1557) [SYCL] Initial ABI checks implementation (intel#1528) [SYCL] Support connection with multiple plugins (intel#1490) [SYCL] Add a new header file with the reduction class definition (intel#1558) [SYCL] Add test for SYCL kernels with accessor and spec constant (intel#1536) [SYCL][CUDA] Move interop tests (intel#1570) [Driver][SYCL] Remove COFF object format designator for Windows device compiles (intel#1574) [SYCL] Fix conflicting visibility attributes (intel#1571) [SYCL][DOC] Update the SYCL Runtime Interface document with design details (intel#680) [SYCL] Improve image accessors support on a host device (intel#1502) [SYCL] Make queue's non-USM event ownership temporary (intel#1561) [SYCL] Added support of rounding modes for non-host devices (intel#1463) [SYCL] SemaSYCL significant refactoring (intel#1517) [SYCL] Support 0-dim accessor in handler::copy(accessor, accessor) (intel#1551)
Map FlagToSRF and SRFToFlag pseudo instructions to scalar instructions. Enable uniform analysis on G_ZEXT/G_SEXT for i1 source, as this may map to FlagToSRF.
In case a SYCL kernel captures specialization constants and more than
one accessor it crashes. I think the crash happens due to an extra
increment of KernelFuncParam, in CreateOpenCLKernelBody() method.
Signed-off-by: Alexey Sotkin alexey.sotkin@intel.com