Skip to content
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

Merged
merged 8 commits into from
Feb 16, 2024

Conversation

0x12CC
Copy link
Contributor

@0x12CC 0x12CC commented Jan 27, 2024

This PR adds a test plan for the sycl_ext_oneapi_kernel_compiler_spirv extension.

This PR adds a test plan for the `sycl_ext_oneapi_kernel_compiler_spirv` extension.

Signed-off-by: Michael Aziz <[email protected]>
@0x12CC 0x12CC requested review from gmlueck and a team as code owners January 27, 2024 04:41
test_plans/oneapi_kernel_compiler_spirv.asciidoc Outdated Show resolved Hide resolved

== Tests

All of the following tests run SPIR-V kernels loaded in binary form.
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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 a kernel 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.

(https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc#overview)

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 via handler::use_kernel_bundle() and instead implicitly uses the kernel bundle that contains the kernelObject.

Therefore, it is not necessary to call handler::use_kernel_bundle.

test_plans/oneapi_kernel_compiler_spirv.asciidoc Outdated Show resolved Hide resolved
Signed-off-by: Michael Aziz <[email protected]>
Signed-off-by: Michael Aziz <[email protected]>
test_plans/oneapi_kernel_compiler_spirv.asciidoc Outdated Show resolved Hide resolved

== Tests

All of the following tests run SPIR-V kernels loaded in binary form.
Copy link
Member

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.

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

test_plans/oneapi_kernel_compiler_spirv.asciidoc Outdated Show resolved Hide resolved

== Tests

All of the following tests run SPIR-V kernels loaded in binary form.
Copy link
Contributor

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 a kernel 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.

(https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc#overview)

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 via handler::use_kernel_bundle() and instead implicitly uses the kernel bundle that contains the kernelObject.

Therefore, it is not necessary to call handler::use_kernel_bundle.

test_plans/oneapi_kernel_compiler_spirv.asciidoc Outdated Show resolved Hide resolved
@0x12CC 0x12CC requested a review from gmlueck February 16, 2024 02:17
@bader bader merged commit 42e9081 into KhronosGroup:SYCL-2020 Feb 16, 2024
8 checks passed
@0x12CC 0x12CC deleted the kernel_compiler_spirv_test_plan branch February 16, 2024 18:16
0x12CC added a commit to 0x12CC/SYCL-CTS that referenced this pull request Feb 16, 2024
…sion

Implements the tests described in KhronosGroup#858.

Signed-off-by: Michael Aziz <[email protected]>
0x12CC added a commit to 0x12CC/SYCL-CTS that referenced this pull request Feb 16, 2024
Implements the tests described in KhronosGroup#858.

Signed-off-by: Michael Aziz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants