Skip to content

[SYCL][Level Zero] Implement sycl_ext_intel_cslice extension #7626

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

Merged
merged 16 commits into from
Dec 12, 2022

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Dec 2, 2022

With this change, on PVC sub-sub-devices now require info::partition_property::ext_intel_partition_by_cslice instead of info::partition_property::partition_by_affinity_domain that wasn't quite accurately describing the actual scheme.

The old behavior could be temporarily restored via SYCL_PI_LEVEL_ZERO_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING environment variable but it is immediately deprecated, and customers are encouraged to switch to the new partitioning scheme as soon as possible.

However, even in this scenario, sub_sub_device.get_info<info::device::partition_type_property>() would return info::partition_property::ext_intel_partition_by_cslice. That is due to the fact that the whole device hierarchy is pre-populated in the plugin, and we don't know in advance what partitioning would be used in get_sub_devices call from SYCL RT.

On other devices, CSlice-based partitioning is now disabled because that's not how the actual H/W works. If precise manual access to individual CCS is required than sycl_ext_intel_queue_index extension should be used instead.

Extension specification is being added in #7513.

With this change, on PVC sub-sub-devices now require
info::partition_property::ext_intel_partition_by_cslice instead of
info::partition_property::partition_by_affinity_domain that wasn't quite
accurately describing the actual scheme.

On other devices, CSlice-based partitioning is now disabled because
that's not how the actual H/W works. If precise manual access to
individual CCS is required than sycl_ext_intel_queue_index extension
should be used instead.

Extension specification is being added in intel#7513.
@aelovikov-intel aelovikov-intel requested review from a team as code owners December 2, 2022 21:50
@aelovikov-intel aelovikov-intel marked this pull request as draft December 2, 2022 21:50
aelovikov-intel added a commit to aelovikov-intel/llvm-test-suite that referenced this pull request Dec 2, 2022
@aelovikov-intel aelovikov-intel marked this pull request as ready for review December 2, 2022 22:04
@aelovikov-intel
Copy link
Contributor Author

There is more work to be done, but I think that could be handled in separate PRs.

Possibly incomplete list:

  • Report right number of compute units for sub-sub-devices - I believe I've seen an issue here even before this PR, hence separate change is justified.
  • Check/implement/fix backend interoperability.
  • Verify/fix/implement interactions with sycl_ext_intel_queue_index extension - need it to be merged in first.

@@ -4172,6 +4172,7 @@ _ZNK4sycl3_V16device14is_acceleratorEv
_ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4230EEESt6vectorIS1_SaIS1_EEm
_ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4231EEESt6vectorIS1_SaIS1_EERKS5_ImSaImEE
_ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4232EEESt6vectorIS1_SaIS1_EENS3_25partition_affinity_domainE
_ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4233EEESt6vectorIS1_SaIS1_EEv
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update Windows symbols as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Local windows build is broken for me. I'm working with @steffenlarsen on resolving this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@aelovikov-intel aelovikov-intel requested a review from a team as a code owner December 6, 2022 19:28
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

sycl/doc/EnvironmentVariables.md looks okay to me.

@aelovikov-intel aelovikov-intel requested a review from a team as a code owner December 9, 2022 21:40
@aelovikov-intel
Copy link
Contributor Author

@steffenlarsen would you please approve the docs change and merge?

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@steffenlarsen steffenlarsen merged commit 5995c61 into intel:sycl Dec 12, 2022
pvchupin pushed a commit to intel/llvm-test-suite that referenced this pull request Dec 13, 2022
againull pushed a commit that referenced this pull request Feb 7, 2023
Recently, an extension was added here:
#7513
This extension allows partitioning a device by "cslice" (aka CCS-es).
With this change, on PVC sub-sub-devices now require
info::partition_property::ext_intel_partition_by_cslice instead of
info::partition_property::partition_by_affinity_domain that wasn't quite
accurately describing the actual scheme.
Level Zero backend support was added here:
#7626
In this change, we are adding support in OpenCL plugin.

This change makes use of the cl_intel_command_queue_families recently
added.

Signed-off-by: Arvind Sudarsanam <[email protected]>
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
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.

6 participants