Skip to content

[SYCL][L0] Proposal for new device descriptors for Intel GPU devices #2806

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 9 commits into from
Dec 10, 2020

Conversation

glyons-intel
Copy link
Contributor

@glyons-intel glyons-intel commented Nov 20, 2020

This proposal details what is required to expose some low-level details of hardware devices as a SYCL extension.

Signed-off-by: Gail Lyons gail.lyons@intel.com

An internal team at Intel has requested a new device descriptors to
provide access to low-level details about Intel GPU devices.
This proposal details what is required to provide this information
as a SYCL extension.

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
jbrodman
jbrodman previously approved these changes Nov 20, 2020
Signed-off-by: Gail Lyons <gail.lyons@intel.com>
jbrodman
jbrodman previously approved these changes Nov 20, 2020
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

Does it need to be so much specific to "Intel GPU"?
Is there a process defined that can be used to make it more generic later, if other backends/devices decide to support this?

@jbrodman
Copy link
Contributor

Does it need to be so much specific to "Intel GPU"?
Is there a process defined that can be used to make it more generic later, if other backends/devices decide to support this?

We can always rev the specification in the future, but atm only Intel GPUs define "EU"s.

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@smaslov-intel
Copy link
Contributor

smaslov-intel commented Nov 24, 2020

Does it need to be so much specific to "Intel GPU"?
Is there a process defined that can be used to make it more generic later, if other backends/devices decide to support this?

We can always rev the specification in the future, but atm only Intel GPUs define "EU"s.

How about PCI address? Doesn't it apply to all PCI devices?

Unfortunately, only the Level Zero backend provides the PCI address today.

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@smaslov-intel
Copy link
Contributor

Unfortunately, only the Level Zero backend provides the PCI address today.

That's fine. The feature main remain unsupported by other backends, but I am suggesting that it should not be called "Intel GPU" feature from the beginning.

@gmlueck
Copy link
Contributor

gmlueck commented Nov 25, 2020

That's fine. The feature main remain unsupported by other backends, but I am suggesting that it should not be called "Intel GPU" feature from the beginning.

Are you just concerned about the title and description of the extension? (E.g. the title is currently "New device descriptors for Intel GPUs".) I presume we could change these in the future if we add support for non-Intel GPUs.

Note that the "intel" in the feature test macro (SYCL_EXT_INTEL_GPU_DEVICE_INFO) and in the aspect names (aspect::ext_intel_gpu_pci_address) indicate that this is an Intel extension, not that it applies only to Intel devices. Even if we supported non-Intel devices in the future, we would still keep "intel" here. We would only remove these "intel" strings if these APIs get added into the core SYCL language or if they are adopted as a Khronos extension (i.e. not an Intel extension).

We might, however, consider dropping the "gpu" from the PCI APIs. For example, aspect::ext_intel_pci_address instead of aspect::ext_intel_gpu_pci_address. This would make sense if we think we might support getting the PCI address of non-GPU accelerators in the future.

@smaslov-intel
Copy link
Contributor

We might, however, consider dropping the "gpu" from the PCI APIs. For example, aspect::ext_intel_pci_address instead of aspect::ext_intel_gpu_pci_address. This would make sense if we think we might support getting the PCI address of non-GPU accelerators in the future.

Yes, that's what I wanted. I think someone mentioned OpenCL support for PCI is coming too, so I assume more than GPU would be covered then already.

@glyons-intel
Copy link
Contributor Author

We might, however, consider dropping the "gpu" from the PCI APIs. For example, aspect::ext_intel_pci_address instead of aspect::ext_intel_gpu_pci_address. This would make sense if we think we might support getting the PCI address of non-GPU accelerators in the future.

Yes, that's what I wanted. I think someone mentioned OpenCL support for PCI is coming too, so I assume more than GPU would be covered then already.

I can remove the "gpu" from the PCI address device descriptor and aspect.

Should I add a separate Feature Test Macro for the PCI address? Something like SYCL_EXT_INTEL_DEVICE_INFO? SYCL_EXT_INTEL_GPU_DEVICE_INFO still seems appropriate for the EU count and the EU SIMD width.

@smaslov-intel
Copy link
Contributor

Should I add a separate Feature Test Macro for the PCI address? Something like SYCL_EXT_INTEL_DEVICE_INFO?

I'd think so, yes. These are independent features traveling by themselves.

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@gmlueck
Copy link
Contributor

gmlueck commented Dec 2, 2020

Personally, I think we could still call this all one "feature", rather than breaking the PCI address into a separate feature, but I admit this is a matter of taste.

If we do want this to be two features, we should have two documents. So, the only change I suggest is to break the PCI address query out into its own document named something like "IntelDeviceInfo.md".

@smaslov-intel
Copy link
Contributor

Personally, I think we could still call this all one "feature", rather than breaking the PCI address into a separate feature, but I admit this is a matter of taste.

If we do want this to be two features, we should have two documents. So, the only change I suggest is to break the PCI address query out into its own document named something like "IntelDeviceInfo.md".

I'd be OK with single feature for all device info extension.

@gmlueck
Copy link
Contributor

gmlueck commented Dec 3, 2020

I'd be OK with single feature for all device info extension.

Great! In that case, keep a single document, move the feature test macro back to the top of the document, and name the feature test macro "SYCL_EXT_INTEL_DEVICE_INFO".

Additional low-level information will be provided for
Intel GPUs using the Level Zero backend:
 - Number of slices
 - Number of subslices in a slice
 - Number of EUs in a subslice
 - Maximum memory bandwidth

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
Signed-off-by: Gail Lyons <gail.lyons@intel.com>



# Intel GPU PCI Address #
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be "Intel GPU" now. Please also review other instances of "Intel GPU" in this document.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just for PCI address? With the exception of maybe "memory bandwidth", the rest are extremely Intel GPU specific.

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! I made both PCI address and max memory bandwidth more generic.

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@@ -0,0 +1,246 @@
# SYCL(TM) Proposal: New device descriptors for Intel GPUs
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not call it all "Intel GPU" extensions, but just Intel's extension for device info (which SYCL_EXT_INTEL_DEVICE_INFO feature test macro already says)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

Signed-off-by: Gail Lyons <gail.lyons@intel.com>
@jbrodman jbrodman self-requested a review December 9, 2020 20:36
Copy link
Contributor

@jbrodman jbrodman left a comment

Choose a reason for hiding this comment

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

LGTM!

@bader bader merged commit 1ad813b into intel:sycl Dec 10, 2020
@glyons-intel glyons-intel deleted the glyons/deviceinfo branch January 28, 2021 21:34
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