-
Notifications
You must be signed in to change notification settings - Fork 744
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][CUDA] PI API Image Support for CUDA #1954
Conversation
3ac4ed3
to
1829803
Compare
207922c
to
2740b19
Compare
@StuartDAdams, could you fix formatting, please? @smaslov-intel, could you take a look, please? |
1c5ab05
to
c3493aa
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.
@smaslov-intel, @romanovvlad, could you take a look, please?
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.
@StuartDAdams, there are build failures after conflict resolution. Please, take a look.
Looks like git found a couple of the lines confusing when rebasing. Not sure why. Fixed now. |
@smaslov-intel, @romanovvlad, could you take a look, please? |
LGTM, but do we have tests on this APIs? If not, could you please add them? |
Testing is provided by #1970. |
6a96626
to
c7e76c4
Compare
arrayDesc.Format != CU_AD_FORMAT_SIGNED_INT32 && | ||
arrayDesc.Format != CU_AD_FORMAT_HALF && | ||
arrayDesc.Format != CU_AD_FORMAT_FLOAT) { | ||
cl::sycl::detail::pi::die( |
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.
@nyalloc, sorry for raising such an old PR. Could you please comment why only these four types are supported for an image. Is that the CUDA limitation or something to be fixed on plugin side?
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.
hi @vladimirlaz I can answer to this, so the reason that just these image formats are supported is based on the interest in the feature at the time they were implemented, we're not aware of any limitation in CUDA that would prevent the remaining SYCL 2020 image formats (8-bit and 16-bit integer) being supported, though someone would have to investigate this.
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.
@AerialMantis thank you for the info
Signed-off-by: Sidorov, Dmitry <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@0ed2286
Updates the CUDA
piMem
implementation to support images.Provides implementations of the PI API
piMemImageCreate
,piEnqueueMemImageRead
,piEnqueueMemImageWrite
andpiEnqueueMemImageCopy
functions for CUDA backends.The implementation required changes to the
_pi_mem
struct so that it supports both images and buffers, so changes were necessary across many CUDApiMem*
function implementations.Testing is provided by #1970.