-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Added a new test case for sub-group attributes #537
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
} \ | ||
}; | ||
|
||
KERNEL_FUNCTOR_WITH_SIZE(1); |
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.
Overall this test looks good. I have only one concern that it might not work properly on any OpenCL RT with sub-groups support.
The problem is that all kernel functions described here are going to be included into a one device program which will be compiled later by a device compiler - and this might cause errors because apparently device doesn't have to support all sub-group sizes listed in here and it is legal to fail compilation if requested sub-group size is not supported.
Probably it is a bug in our implementation, that build_with_kernel_type
actually performs build of all kernels instead of just one, but I don't know SYCL spec so good to say for sure.
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 remembered there's a ticket created by Evgeniy describing the issue of building all kernels.
@tianshilei1992, could you take a look at failing lit tests, please? |
Sorry for not solving it. I’ll do it in this week. |
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.
Since it is just a unit test, it does not worth over engineering it.
cl::sycl::program Prog(Queue.get_context()); | ||
|
||
// Store the `cl::sycl::kernel` into a vector because `cl::sycl::kernel` | ||
// doesn't have default constructor |
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 the comment.
It is not clear what you are trying to do here...
throw feature_not_supported("sub-group size is not supported"); | ||
} | ||
|
||
auto Kernel = TheKernel[0]; |
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 see... You are emulating a C++17 std::optional
since you are in C++11... :-(
On the other hand you could make a specification proposal to add a default constructor to a cl::sycl::kernel
and a member function to test if the kernel is valid... :-)
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 sure whether it makes sense to request it. :)
Well, mainly working on fixing an issue that could only be reproduced on GPU. But I don't have GPU system on my hand. Waiting for it. :) |
Report the issue at #640. |
I disabled the test on GPU intentionally as it fails because all kernels are actually built when calling building function to just one kernel.
|
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.
AFAIK, Intel GPUs support only 8, 16 or 32 sub-group sizes.
Signed-off-by: Shilei Tian <[email protected]>
Signed-off-by: Shilei Tian [email protected]