-
Notifications
You must be signed in to change notification settings - Fork 82
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
Create test plan for sycl_ext_oneapi_kernel_compiler_spirv
extension
#858
Create test plan for sycl_ext_oneapi_kernel_compiler_spirv
extension
#858
Conversation
This PR adds a test plan for the `sycl_ext_oneapi_kernel_compiler_spirv` extension. Signed-off-by: Michael Aziz <[email protected]>
|
||
== Tests | ||
|
||
All of the following tests run SPIR-V kernels loaded in binary form. |
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.
This is probably more of a question to the extension spec:
It seems like it allows to obtain a (more or less) regular kernel_bundle<executable>
that can be passed by user to handler::use_kernel_bundle
API and define and launch a kernel using regular parallel_for
mechanism in the SYCL source.
The question here: is it legal? If not, do we expect a certain exception to be thrown? And if so, there should be a test case for 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.
You are right, the spec extension does not describe this detail besides giving an code sample showing how the kernel API is really used.
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.
The extension spec says the following:
The new APIs added by this extension are an expansion of the existing
kernel_bundle
capabilities. Thus, an application can create a kernel bundle from a source string and then build the bundle into "executable" bundle state. Once the application obtains akernel
object, it can use existing APIs from the core SYCL specification to set the value of kernel arguments and enqueue the kernel to a device.
Therefore, the application must use the overload of parallel_for
or single_task
that takes a parameter of type kernel
if it wants to enqueue a kernel that was created from this extension. These overloads are defined in the core SYCL specification, and the description contains the following text:
This invocation function ignores any
kernel_bundle
that was bound to this command group handler viahandler::use_kernel_bundle()
and instead implicitly uses the kernel bundle that contains thekernelObject
.
Therefore, it is not necessary to call handler::use_kernel_bundle
.
Signed-off-by: Michael Aziz <[email protected]>
Signed-off-by: Michael Aziz <[email protected]>
|
||
== Tests | ||
|
||
All of the following tests run SPIR-V kernels loaded in binary form. |
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.
You are right, the spec extension does not describe this detail besides giving an code sample showing how the kernel API is really used.
Co-authored-by: Ronan Keryell <[email protected]>
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.
Thanks.
|
||
== Tests | ||
|
||
All of the following tests run SPIR-V kernels loaded in binary form. |
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.
The extension spec says the following:
The new APIs added by this extension are an expansion of the existing
kernel_bundle
capabilities. Thus, an application can create a kernel bundle from a source string and then build the bundle into "executable" bundle state. Once the application obtains akernel
object, it can use existing APIs from the core SYCL specification to set the value of kernel arguments and enqueue the kernel to a device.
Therefore, the application must use the overload of parallel_for
or single_task
that takes a parameter of type kernel
if it wants to enqueue a kernel that was created from this extension. These overloads are defined in the core SYCL specification, and the description contains the following text:
This invocation function ignores any
kernel_bundle
that was bound to this command group handler viahandler::use_kernel_bundle()
and instead implicitly uses the kernel bundle that contains thekernelObject
.
Therefore, it is not necessary to call handler::use_kernel_bundle
.
Signed-off-by: Michael Aziz <[email protected]>
Signed-off-by: Michael Aziz <[email protected]>
Signed-off-by: Michael Aziz <[email protected]>
…0x12CC/SYCL-CTS into kernel_compiler_spirv_test_plan
…sion Implements the tests described in KhronosGroup#858. Signed-off-by: Michael Aziz <[email protected]>
Implements the tests described in KhronosGroup#858. Signed-off-by: Michael Aziz <[email protected]>
This PR adds a test plan for the
sycl_ext_oneapi_kernel_compiler_spirv
extension.