-
Notifications
You must be signed in to change notification settings - Fork 766
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
Using sycl::info::kernel_device_specific::max_sub_group_size gives undefined references #5071
Comments
kokkos/kokkos#4579 is related. |
Interesting... this sample compiles with the latest nightly build, but I think this sample uses non-forward declarable kernel type name and I would expect the compiler to give an error here. using Functor = Dummy<decltype(lambda)>;
Functor functor(lambda);
cgh.parallel_for(10, functor); For this invoking method we use a function type as a kernel type name and it seems to violate forward-declarable requirement. @erichkeane, do you expect the compiler to report an error here? |
That is an 'unnamed kernel', which allows non-forward declarable type names, right? Or am I missing something in your example? |
Compiler gives me my error with The linker error is due to the bug in the provided reproducer. auto num_regs = kernel.template get_info<
sycl::info::kernel_device_specific::max_sub_group_size>(q.get_device(), /* WOGK-GROUP SIZE IS MISSING */); This API requires work-group size as input parameter. |
Oh, "funny". The spec is far less clear |
It would seem to me that we'd want an error in this case, right? How come we don't validate the right parameters list there? I would expect a specialization of get_info to do that (or attempt to call something variadically that would otherwise fail...). |
Yes, I was looking at the standard for the correct syntax. Apparently, the documentation was changed a while ago to require an additional |
I think there are two problems here:
|
Making a small change to the code above, dealing with the missing parameter and removing the q.submit
This returns a runtime error. Putting the q.submit back it and it runs on Gen9.
|
Removing |
Sorry if it's a stupid question (my comprehension of |
According to understanding, library-only implementation of APIs introspecting device BTW, oneAPI DPC++ implementation is not library-only implementation. |
@masterleinad Could you please tell if the issue is resolved? |
With the latest release
I still get
and no proper error message saying that this call requires the workgroup size as a parameter. Thus, it still seems to not conform to the SYCL standard which says in https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_queries:
|
@masterleinad could you please try again with the latest release? I have just tried myself and I can't reproduce the error. |
I can confirm that this is resolved. Thank you! |
Describe the bug
Trying to use
sycl::info::kernel_device_specific::max_sub_group_size
gives undefined references.To Reproduce
Compiling
via
icpx -fsycl bla.cc
givesEnvironment (please complete the following information):
The text was updated successfully, but these errors were encountered: