Skip to content

Conversation

againull
Copy link
Contributor

@againull againull commented Aug 15, 2024

Currently if there is only single device in the context then kernel
compiler passes ip version of that device via -device option to ocloc
when compiling OpenCL program to spirv to let ocloc enable all extensions
supported by that device. Problem is that ocloc -spv_only doesn't produce
spirv file when multiple devices are provided via -device option.
That's why in this case enable common extensions supported by all devices
manually. To do that use ocloc query to get common supported features
for the list of devices and then process the return and enable features
via ocloc -internal_options -cl-ext=+feature1,...

Currently if there is only single device in the context then kernel
compiler passes ip version of that device via -device option to ocloc
when compiling OpenCL program to spirv to let ocloc enable all extensions
supported by that device. Problem is that ocloc -spv_only doesn't produce
spirv file when multiple devices are provided via  -device option.
That's why in this case  enable common extensions supported by all devices
manually. To do that use ocloc query to get common supported features
for the list of devices and then process the return and enable features
via ocloc -internal_options -cl-ext=+feature1,...
@againull againull force-pushed the opencl_to_spirv_multi_device branch from 7f92809 to d8f0f05 Compare August 19, 2024 21:55
@againull againull marked this pull request as ready for review August 19, 2024 23:17
@againull againull requested a review from a team as a code owner August 19, 2024 23:17
@againull againull requested a review from bso-intel August 19, 2024 23:17
Copy link
Contributor

@bso-intel bso-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@againull againull merged commit 662d3b5 into intel:sycl Aug 21, 2024
@againull againull deleted the opencl_to_spirv_multi_device branch September 30, 2024 20:23
AlexeySachkov pushed a commit to AlexeySachkov/llvm that referenced this pull request Nov 26, 2024
intel#15099)

Currently if there is only single device in the context then kernel
compiler passes ip version of that device via -device option to ocloc
when compiling OpenCL program to spirv to let ocloc enable all
extensions
supported by that device. Problem is that ocloc -spv_only doesn't
produce
spirv file when multiple devices are provided via  -device option.
That's why in this case enable common extensions supported by all
devices
manually. To do that use ocloc query to get common supported features
for the list of devices and then process the return and enable features
via ocloc -internal_options -cl-ext=+feature1,...
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.

2 participants