-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Option to disable alloca address space for sret arguments #17976
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] Option to disable alloca address space for sret arguments #17976
Conversation
This reverts commit 3c3ad27.
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.
SYCL RT LGTM, but this PR needs a better description.
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.
Thank you for picking this up!
See also #17976 (comment)
@@ -13,63 +13,63 @@ using namespace sycl::ext::oneapi::experimental; | |||
|
|||
namespace static_as_cast { | |||
// CHECK-LABEL: define dso_local spir_func void @_ZN14static_as_cast19to_global_decoratedEN4sycl3_V19multi_ptrIiLNS1_6access13address_spaceE6ELNS3_9decoratedE1EEE( | |||
// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(%"class.sycl::_V1::multi_ptr") align 8 captures(none) [[AGG_RESULT:%.*]], ptr noundef readonly byval(%"class.sycl::_V1::multi_ptr.0") align 8 captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {{.*}}{ | |||
// CHECK-SAME: ptr addrspace(4) dead_on_unwind noalias writable writeonly sret(%"class.sycl::_V1::multi_ptr") align 8 captures(none) initializes((0, 8)) [[AGG_RESULT:%.*]], ptr noundef readonly byval(%"class.sycl::_V1::multi_ptr.0") align 8 captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {{.*}}{ |
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 would be great if we could check both modes.
Should this file be also updated? (these lines should be removed) llvm/sycl/cts_exclude_filter/compfails Lines 3 to 4 in 46da71a
|
Yes, I would expect this problem to be fixed/hidden by the option until we figure out how to deal with alloca for srets properly. |
// Disable this option for SPIR targets. | ||
// TODO: This needs to be re-enabled once we have a real fix. | ||
CmdArgs.push_back("-fno-offload-use-alloca-addrspace-for-srets"); | ||
} |
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.
Updated change LGTM
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.
@intel/llvm-gatekeepers, can this please be merged? @tahonermann reviewed and approved this for CFE. (Since I am running this PR, I don't want to self-approve this.) |
The code-formatting error is about a test case, not source code. Not sure why it is being flagged. |
Tests should be properly formatted too... Also note Line 2 in a53dacf
Maybe renaming the |
Sure, but the changes it is suggesting didn't make sense to me.
This may be it. Thanks, let me try. |
Thank you @aelovikov-intel, that was it. |
Thank you @aelovikov-intel |
Recent community change llvm/llvm-project#114062 enabled the use of
alloca address space for sret arguments. This causes several issues for sycl, particularly for the SPIR
target where this leads to invalid address-space-casts from the local address space.
The new option -foffload-use-alloca-addrspace-for-srets is TRUE by default (and produces the current
community behavior) and is set to FALSE in sycl device compilation modes (where the prior behavior is
retained). The commit also reverts some test changes made to reflect the current community behavior.