-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Pass foffload-fp32-prec-[div/sqrt] options to device's BE #16107
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
b840a24
to
5490f22
Compare
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// Remove llvm.fpbuiltin.[sqrt/fdiv] intrinsics to ensure compatibility with the |
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.
@gmlueck without the deep dive into the pass, may I ask you to check if the logic of the pass described in the comment makes sense to you? Note, I'm not adding annotation of the kernels with some optional kernel feature metadata, that could help discarding 'precise' options from the list of the BE options.
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.
Reason is: currently we either have the intrinsics in the module or don't have them at all. And when we have the - non-precise option was already passed, so there is nothing to rewrite for BE options.
This sounds SPIR-V specific problem, so I think the right place to run the pass is SPIR-V generator (i.e. SPIR-V translator or SPIR-V backend). |
5490f22
to
8250855
Compare
On the other hand it's SYCL/OpenMP specific problem, how it would benefit https://github.com/KhronosGroup/SPIRV-LLVM-Translator community? Also it's still might be beneficial here for non-SPIR-V targets. UPD: actually, I'm still leaning towards removing this pass. So let me try to land this patch without it and then restore it if needed. |
This patch also adds a pass the removes llvm.fpbuiltin.[sqrt/fdiv] intrinsic functions from the module to ensure compatibility with the old drivers (that don't support SPV_INTEL_fp_max_error extension) in case if they are used with standart for OpenCL max-error (e.g [3.0/2.5] ULP) and there are no other llvm.fpbuiltin.* intrinsic functions, fdiv instructions or @sqrt builtins/intrinsics in the module. Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
e702fed
to
9bef8ff
Compare
This reverts commit 9bef8ff.
Signed-off-by: Sidorov, Dmitry <[email protected]>
182c991
to
3b240f9
Compare
Signed-off-by: Sidorov, Dmitry <[email protected]>
@steffenlarsen please have another look at the PR, thanks |
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!
@intel/llvm-gatekeepers please help with the merge |
Since a pass that cleans up unnecessary llvm.fpbuiltin intrinsics was removed from #16107 we need to enable the extension by default to successfully translate them. Signed-off-by: Sidorov, Dmitry <[email protected]>
No description provided.