-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][Bindless][2/4] Add experimental implementation of SYCL bindless images extension #10112
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][Bindless][2/4] Add experimental implementation of SYCL bindless images extension #10112
Conversation
f74cf46
to
a450cd7
Compare
…s images extension This commit stands as the second commit of four to make code review easier, covering the changes made to the PI. Co-authored-by: Isaac Ault <isaac.ault@codeplay.com> Co-authored-by: Hugh Bird <hugh.bird@codeplay.com> Co-authored-by: Duncan Brawley <duncan.brawley@codeplay.com> Co-authored-by: Przemek Malon <przemek.malon@codeplay.com> Co-authored-by: Chedy Najjar <chedy.najjar@codeplay.com> Co-authored-by: Sean Stirling <sean.stirling@codeplay.com> Co-authored-by: Peter Zuzek <peter@codeplay.com> Implement revision 4 of the bindless images extension proposal: intel#9842
a450cd7
to
fc60063
Compare
case UR_IMAGE_CHANNEL_ORDER_A: { | ||
PiFormat->image_channel_order = PI_IMAGE_CHANNEL_ORDER_A; | ||
break; | ||
} |
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.
How about something like
#define MAP(FROM, TO) \
case FROM: { \
PiFormat->image_channel_order = TO; \
break; \
}
And if we can change the spelling for enum entries in cases like
case UR_IMAGE_CHANNEL_ORDER_RX: {
PiFormat->image_channel_order = PI_IMAGE_CHANNEL_ORDER_Rx;
then even FROM
/TO
could be replaced with a single argument...
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.
Added a MAP
macro as you've specified. One for each of channel_order
and channel_data_type
.
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.
While we are at it, the helpers could also be done in the MAP
manner, for example pi2urImageDesc
.
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.
@aelovikov-intel @jchlanda Done.
@@ -873,6 +873,85 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, | |||
case UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES: { | |||
return ReturnValue(int32_t{1}); | |||
} | |||
case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: { | |||
// On CUDA bindless images are supported |
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.
// On CUDA bindless images are supported | |
// On CUDA bindless images are supported. |
Same elsewhere.
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.
Added punctuation to comments throughout.
5aa5702
to
082a6f4
Compare
* [[maybe_unused]] flag added to pi_level_zero * pi_hip piSamplerCreate updated for API change * Macro used for image format switch cases * Added punctuation to comments
082a6f4
to
109414b
Compare
d0c3261
to
07320a2
Compare
07320a2
to
031107f
Compare
case PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT: { | ||
InfoType = UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP; | ||
break; | ||
} |
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.
Can use MAP
here as well.
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.
Done. Applied to add cases for this statement.
case UR_IMAGE_CHANNEL_TYPE_UNORM_INT8: | ||
cuda_format = CU_AD_FORMAT_UNORM_INT8X1; | ||
PixelTypeSizeBytes = 1; | ||
break; |
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.
Three-operand MAP
/CASE
macro?
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.
Done.
case CU_AD_FORMAT_UNSIGNED_INT8: | ||
*return_image_channel_type = UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8; | ||
break; |
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.
MAP
.
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.
Done.
@jandres742 We have incorporated the latest UR changes related to interop resource handles. These are now represented by structs and passed to the UR through Can you confirm whether you are happy with the changes, and if so, could you please give your approval on this PR? |
Thanks @przemektmalon . I think we need to define the export API. Even if there were no support, we are defining here the extension, so it should include the export APIs, so whenever support is added to the backends, the SYCL and PI support is already there. what do you think? does it make sense? |
Let's defer additions to future PRs so we can unblock this. It is now ready to merge, correct? |
This is OK from the CP team perspective, we have addressing all comments and concerns. |
It seems this broke post-commit: https://github.com/intel/llvm/actions/runs/5589657189/jobs/10218527948. |
Thanks @jbrodman . Sure, if the API to export will be added shortly after, no concerns. |
@isaacault | @przemektmalon - Could you please address the post-commit failure ASAP? |
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: intel#10112
Created PR 10464 to address this. |
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: #10112
…CL bindless images extension (#10500) # Experimental Implementation of SYCL Bindless Images Extension This commit stands as the fourth, and final, commit of four to make code review easier, covering the additional tests for bindless images to the e2e test suite. Implementing [revision 4 of the bindless images extension proposal](#9842). This will not compile or run until [PR3](#10454) has been merged. However, it can be reviewed simultaneously with PR3. ## Overview The bindless images extension provides a new interface for allocating, creating, and accessing images in SYCL. Image memory allocation is seperated from image handle creation, and image handles can be passed to kernels without requesting access through accessors. This approach provides much more flexibility to the user, as well as enabling programs to implement features that were impossible to implement using standard SYCL images, such as a texture atlas. In addition to providing a new interface for images, this extension also provides initial experimental support for importing external memory into SYCL. ## Previous PRs * [1/4] [libclc](#9808) * [2/4] [PI/UR](#10112) * [3/4] [SYCL API](#10454) * [4/4] Tests <--- This one ## Authors Co-authored-by: Isaac Ault isaac.ault@codeplay.com Co-authored-by: Hugh Bird hugh.bird@codeplay.com Co-authored-by: Duncan Brawley duncan.brawley@codeplay.com Co-authored-by: Przemek Malon przemek.malon@codeplay.com Co-authored-by: Chedy Najjar chedy.najjar@codeplay.com Co-authored-by: Sean Stirling sean.stirling@codeplay.com Co-authored-by: Peter Zuzek peter@codeplay.com Co-authored-by: SYCL Unbound Team <sycl.unbound@codeplay.com>
…s images extension (intel#10112) # Experimental Implementation of SYCL Bindless Images Extension This commit stands as the second commit of four to make code review easier, implementing revision 4 of the [bindless images extension proposal](intel#9842). ## Scope This PR covers changes made to the PI and the UR. This includes - Extending PI with extension functions - Updating UR FetchContent commit and implementing [UR bindless images experimental features](https://oneapi-src.github.io/unified-runtime/core/EXP-BINDLESS-IMAGES.html) on the CUDA adaptor ## Following Split PRs - [3/4] Implement the user-facing SYCL extension - [4/4] Add tests ## Authors Co-authored-by: Isaac Ault <isaac.ault@codeplay.com> Co-authored-by: Hugh Bird <hugh.bird@codeplay.com> Co-authored-by: Duncan Brawley <duncan.brawley@codeplay.com> Co-authored-by: Przemek Malon <przemek.malon@codeplay.com> Co-authored-by: Chedy Najjar <chedy.najjar@codeplay.com> Co-authored-by: Sean Stirling <sean.stirling@codeplay.com> Co-authored-by: Peter Zuzek <peter@codeplay.com>
…s images extension (intel#10112) # Experimental Implementation of SYCL Bindless Images Extension This commit stands as the second commit of four to make code review easier, implementing revision 4 of the [bindless images extension proposal](intel#9842). ## Scope This PR covers changes made to the PI and the UR. This includes - Extending PI with extension functions - Updating UR FetchContent commit and implementing [UR bindless images experimental features](https://oneapi-src.github.io/unified-runtime/core/EXP-BINDLESS-IMAGES.html) on the CUDA adaptor ## Following Split PRs - [3/4] Implement the user-facing SYCL extension - [4/4] Add tests ## Authors Co-authored-by: Isaac Ault <isaac.ault@codeplay.com> Co-authored-by: Hugh Bird <hugh.bird@codeplay.com> Co-authored-by: Duncan Brawley <duncan.brawley@codeplay.com> Co-authored-by: Przemek Malon <przemek.malon@codeplay.com> Co-authored-by: Chedy Najjar <chedy.najjar@codeplay.com> Co-authored-by: Sean Stirling <sean.stirling@codeplay.com> Co-authored-by: Peter Zuzek <peter@codeplay.com>
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: intel#10112
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: intel/llvm#10112
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: intel/llvm#10112
…CL bindless images extension (intel#10500) # Experimental Implementation of SYCL Bindless Images Extension This commit stands as the fourth, and final, commit of four to make code review easier, covering the additional tests for bindless images to the e2e test suite. Implementing [revision 4 of the bindless images extension proposal](intel#9842). This will not compile or run until [PR3](intel#10454) has been merged. However, it can be reviewed simultaneously with PR3. ## Overview The bindless images extension provides a new interface for allocating, creating, and accessing images in SYCL. Image memory allocation is seperated from image handle creation, and image handles can be passed to kernels without requesting access through accessors. This approach provides much more flexibility to the user, as well as enabling programs to implement features that were impossible to implement using standard SYCL images, such as a texture atlas. In addition to providing a new interface for images, this extension also provides initial experimental support for importing external memory into SYCL. ## Previous PRs * [1/4] [libclc](intel#9808) * [2/4] [PI/UR](intel#10112) * [3/4] [SYCL API](intel#10454) * [4/4] Tests <--- This one ## Authors Co-authored-by: Isaac Ault isaac.ault@codeplay.com Co-authored-by: Hugh Bird hugh.bird@codeplay.com Co-authored-by: Duncan Brawley duncan.brawley@codeplay.com Co-authored-by: Przemek Malon przemek.malon@codeplay.com Co-authored-by: Chedy Najjar chedy.najjar@codeplay.com Co-authored-by: Sean Stirling sean.stirling@codeplay.com Co-authored-by: Peter Zuzek peter@codeplay.com Co-authored-by: SYCL Unbound Team <sycl.unbound@codeplay.com>
- Fixed compiler errors/warnings related to unused and uninitialized variables and parameters. Post-commit fix for PR: intel/llvm#10112
Experimental Implementation of SYCL Bindless Images Extension
This commit stands as the second commit of four to make code review easier, implementing revision 4 of the bindless images extension proposal.
Scope
This PR covers changes made to the PI and the UR. This includes
Following Split PRs
Authors
Co-authored-by: Isaac Ault isaac.ault@codeplay.com
Co-authored-by: Hugh Bird hugh.bird@codeplay.com
Co-authored-by: Duncan Brawley duncan.brawley@codeplay.com
Co-authored-by: Przemek Malon przemek.malon@codeplay.com
Co-authored-by: Chedy Najjar chedy.najjar@codeplay.com
Co-authored-by: Sean Stirling sean.stirling@codeplay.com
Co-authored-by: Peter Zuzek peter@codeplay.com