-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL][RTC] Add support for errors and build log in JIT-based RTC #16132
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
|
This PR currently depends on #16109 for the definition of |
|
@cperkinsintel @jopperm @gmlueck I'd like to hear your opinion on one aspect of the implementation. In the current implementation, I decided to only include the essence of the error diagnostic message in the For the error in the e2e tests, this means that the The build log (via My thinking was that we don't want to include a verbose error message, including other non-error diagnostics, in If you prefer to have the full build log in What's your preference? |
That makes sense to me, but would it be possible to include the source location in the short error messages that go into the exception, to make them more useful on their own? We probably need to include the file path as well, unless it is the RTC source file or one of the virtual headers. |
The |
The specification addresses this:
I found that this was pretty convenient when developing test applications. I didn't need to set up an exception handler or use the Of course, we can change the specification if we think the other behavior is better, but I wonder how easy it is to determine the "essence" of the error. Quite often, a mistake in C++ syntax will lead to a raft of error messages, and I think it is not an easy task to figure out which of these is the essence of the problem. I also suspect that changing the specification in this way would make the extension more difficult for other vendors to implement. The way it is written now, a vendor can spawn the compiler in a separate process and capture the stdout / stderr into the |
That's a good point, it's probably more convenient to get the full error message right away than having to go back, add the
So far, I'm simply using the severity of the diagnostic given by Clang/LLVM to decide what should be in Based on your points and @jopperm's feedback that source locations would be nice, I'll change the implementation to simply include the entire build log in I'll update the PR accordingly, thanks for the feedback! |
|
I addressed the CI errors in #16109, so these should be gone after rebasing. |
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
7a418ee to
482c07e
Compare
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
| explicit RTCResult(RTCBundleInfo &&BundleInfo, const char *BuildLog) | ||
| : Failed{false}, BundleInfo{std::move(BundleInfo)}, ErrorMessage{ | ||
| BuildLog} {} |
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.
| explicit RTCResult(RTCBundleInfo &&BundleInfo, const char *BuildLog) | |
| : Failed{false}, BundleInfo{std::move(BundleInfo)}, ErrorMessage{ | |
| BuildLog} {} | |
| RTCResult(RTCBundleInfo &&BundleInfo, const char *BuildLog) | |
| : Failed{false}, BundleInfo{std::move(BundleInfo)}, ErrorMessage{ | |
| BuildLog} {} |
Drop explicit
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
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.
LGTM but NIT.
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
|
Post-commit failure is addressed in #16243. |
Adds support for correct error message routing and the
save_logproperty to the SYCL-RTC implementation based on the SYCL-JIT library.The diagnostic messages associated with any errors encountered during runtime compilation is stored in the
whatof the exception thrown.If the user passes the
save_logproperty defined in thekernel_compilerextension, all diagnostics encountered during compilation (errors, warnings, notes and remarks) are stored in the user-provided string.