-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][Ext][Bindless] Initial implementation of image spirv builtins on HIP #16439
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
9384f74
to
437f972
Compare
I appreciate that |
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.
This patch brings in a lot of new hand mangled names, was wondering if it would be at all possible to try and avoid those?
#endif | ||
|
||
#ifdef _WIN32 | ||
#define _CLC_MANGLE_FUNC_IMG_HANDLE(namelength, name, prefix, postfix) \ |
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.
Isn't that the kind of thing that the remangler should handle, as in m
- y
, long (long) unsigned
?
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.
@jchlanda I agree that it should probably be the case.
We have that tendency of manually mangling these, for example, also in the atomics
libspirv function implementations. This particular case here is adapted from the libspirv ptx
image implementation. I think it is the perfect candidate to create a follow-up for, where we attempt to cleanup some of the manual mangling (at least for the image functions) across both ptx and amdgcn libspirv target implementations. I'll create an internal ticket for our team to follow this up. Does that sound okay?
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.
I guess it's fine. My point was that if the only reason for manually mangled string is the m
- y
difference, that should work out of the box now. I'm slightly worried that if you found yourself in the situation that it indeed is needed, that means that somehow that case has escaped remangler's attention, and so the remangler needs more work.
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.
Oh I think I see what you meant.
Well I wasn't too sure on that because I was getting Unable to demangle name:
errors without m
/y
.
Mind if I ask for a quick code change suggestion in case I've tested it somehow wrongly?
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.
I don't think you can get it to only skip the unsigned long
/unsigned long long
, the whole macro would need to be removed. So maybe it's best to do it as you suggest in a follow up.
If you have an easy way of reproducing that remangling error though, I'd be interested in that file (it should be possible to isolate it to a single function definition in IR).
I think that would be a good idea. |
sycl/test-e2e/bindless_images/array/read_write_1d_subregion.cpp
Outdated
Show resolved
Hide resolved
eadd947
to
e5e0d35
Compare
e5e0d35
to
3d7280b
Compare
This PR implements the entry points in the HIP adapter for the Bindless Images extension. Some features, while implemented, only partially pass the End-to-end tests for them in DPC++ (the PR that enables the support and testing in DPC++: intel/llvm#16439). This is because the HIP runtime doesn't support, for example, some parameter combinations with some image memory types. The not-fully supported features are marked with TODOs in the device info queries for further work. Signed-off-by: Georgi Mirazchiyski <[email protected]> Co-authored-by: Peter Žužek <[email protected]>
3d7280b
to
0769128
Compare
This PR implements the entry points in the HIP adapter for the Bindless Images extension. Some features, while implemented, only partially pass the End-to-end tests for them in DPC++ (the PR that enables the support and testing in DPC++: intel/llvm#16439). This is because the HIP runtime doesn't support, for example, some parameter combinations with some image memory types. The not-fully supported features are marked with TODOs in the device info queries for further work. Signed-off-by: Georgi Mirazchiyski <[email protected]> Co-authored-by: Peter Žužek <[email protected]>
…on HIP This PR implements the required spirv builtins in the libclc for AMD targets to support image fetching (excluding sampled fetch for now) and sampling as well as image array fetching and sampling. Additionally, End-to-end tests are updated to require the aspects corresponding to the feature that is being tested from the Bindless Images extension. This helps avoid having to manually say which backend adapter is supported or unsupported and instead rely on support based on aspect/device queries to drive the execution of the tests. Signed-off-by: Georgi Mirazchiyski <[email protected]>
Signed-off-by: Georgi Mirazchiyski <[email protected]>
Signed-off-by: Georgi Mirazchiyski <[email protected]>
0769128
to
729dd32
Compare
marking as draft due to cubemap aspect failure. |
Signed-off-by: JackAKirk <[email protected]>
Apologies @cperkinsintel for the request. It was a mistake this doesn't require your review. |
Signed-off-by: JackAKirk <[email protected]>
Signed-off-by: JackAKirk <[email protected]>
Signed-off-by: JackAKirk <[email protected]>
I'd like to get @frasercrmck's opinion on the libclc changes before we merge 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.
Generally LGTM. I've the same old quibbles about manually mangling things like types and address spaces. I hope we can move to C++ to define these builtins sooner rather than later. Not for this patch, though.
// defined in "image_common.cl" | ||
extern _CLC_CONST_AS const unsigned int SAMPLER_OBJECT_OFFSET_DWORD; | ||
|
||
// Helpers for casting between two builitin vector types and/or scalar types. |
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.
typo: builitin
-> builtin
(happens to me all the time)
Thanks for double checking, @ldrumm. I should’ve also requested Fraser to take a look knowing he started improving libclc->libspirv as a whole. |
Signed-off-by: JackAKirk <[email protected]>
Not waiting for a full CI run on a comment change. This looks good to go |
This PR implements the entry points in the HIP adapter for the Bindless Images extension. Some features, while implemented, only partially pass the End-to-end tests for them in DPC++ (the PR that enables the support and testing in DPC++: #16439). This is because the HIP runtime doesn't support, for example, some parameter combinations with some image memory types. The not-fully supported features are marked with TODOs in the device info queries for further work. Signed-off-by: Georgi Mirazchiyski <[email protected]> Co-authored-by: Peter Žužek <[email protected]>
This PR implements the required spirv builtins in the libclc for AMD targets to support fetching (excluding sampled fetch for now), sampling, and writing for images and image arrays.
Additionally, End-to-end tests are updated to require the aspects corresponding to the feature that is being tested from the Bindless Images extension. This helps avoid having to manually say which backend adapter is supported or unsupported and instead rely on support based on aspect/device queries to drive the execution of the tests.
HIP adapter implementation in UR: oneapi-src/unified-runtime#2496
Signed-off-by: Georgi Mirazchiyski [email protected]