-
Notifications
You must be signed in to change notification settings - Fork 770
[SYCL][SCLA] Add sycl::aspect::ext_oneapi_private_alloca
#13181
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
; CHECK-RT: %[[LENGTH:.*]] = call i16 @_Z20__spirv_SpecConstantis(i32 2, i16 1) | ||
; CHECK-RT: {{.*}} = alloca %my_range, i16 %[[LENGTH]], align 64 |
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.
Previously missing
@size_i64 = internal addrspace(1) constant %"class.sycl::_V1::specialization_id" { i64 10 }, align 8 | ||
@size_i32 = internal addrspace(1) constant %"class.sycl::_V1::specialization_id.0" { i32 120 }, align 4 | ||
@size_i16 = internal addrspace(1) constant %"class.sycl::_V1::specialization_id.1" { i16 1 }, align 2 | ||
@size_i64 = addrspace(1) constant %"class.sycl::_V1::specialization_id" { i64 10 }, align 8 | ||
@size_i32 = addrspace(1) constant %"class.sycl::_V1::specialization_id.0" { i32 120 }, align 4 | ||
@size_i16 = addrspace(1) constant %"class.sycl::_V1::specialization_id.1" { i16 1 }, align 2 |
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.
Needed to not drop
#include <sycl/sycl.hpp> | ||
#include <sycl/detail/core.hpp> |
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.
Also did this in all the tests
@@ -1,6 +1,5 @@ | |||
// RUN: %{build} -w -o %t.out | |||
// RUN: echo 1 | %{run} %t.out | |||
// UNSUPPORTED: cuda || hip |
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.
Not needed, using lit.local.cfg
@@ -0,0 +1,31 @@ | |||
// RUN: %clangxx %s -fsycl -fsycl-device-only -S -emit-llvm -o - | FileCheck %s |
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.
Run LLVM passes to check propagation of used aspects
✅ With the latest revision this PR passed the C/C++ code formatter. |
Changes span different components as we need to:
|
fb7cab1
to
2a9ba8a
Compare
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.
FE changes LGTM
@intel/dpcpp-tools-reviewers , @intel/llvm-reviewers-runtime, can I have a quick look here, please? |
Add aspect to check for `sycl_ext_oneapi_private_alloca` extension support. Only SPIR-V (OpenCL and Level Zero) devices have this aspect. In CodeGen, propagate this aspect when creating the `llvm.sycl.alloca.*` intrinsic. In `sycl-post-link`, do not assert on unsupported targets. Instead, assume the default value for the size specialization constant is used and handle the error at runtime. Signed-off-by: Victor Perez <[email protected]>
bd5d6bd
to
cb3022f
Compare
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.
FE changes LGTM
@intel/llvm-gatekeepers can we get this one merged? CI errors look unrelated to this change. |
Failed Tests (1): failure is unrelated and fixed in #13268 |
Add cubemap support: - Allocation and freeing of cubemapped images - Unsampled fetching and writing, and sampled reading - Device queries for cubemap support - Testing for both unsampled and sampled cubemap examples - Update the spec with cubemap support Remove `const` and `&` qualifiers from spec and implementation for handle parameters in `write_xxx` functions. Corresponding UR PR: oneapi-src/unified-runtime#1433 --------- Co-authored-by: Przemek Malon <[email protected]> Resolved Conflicts in: - Due to not cherry-picking intel#12840 - sycl/include/sycl/detail/pi.h - Due to not cherry-picking intel#13181 - sycl/include/sycl/device_aspect_macros.hpp - sycl/include/sycl/info/aspects.def
Add aspect to check for
sycl_ext_oneapi_private_alloca
extension support. Only SPIR-V (OpenCL and Level Zero) devices have this aspect.In CodeGen, propagate this aspect when creating the
llvm.sycl.alloca.*
intrinsic.In
sycl-post-link
, do not assert on unsupported targets. Instead, assume the default value for the size specialization constant is used and handle the error at runtime. SPIR-V AOT compilation should fail in the frontend, so no need to fail here.