Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there any "standard" macro defined in
level_zero/ze_api.h
, which we can check?It would be better to have something like:
instead of these two lines.
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.
There is probably soemthing we could use, e.g. _ZE_API_H, but not sure how "standard" this is. Probably not (+@jandres742)
Also, since all the uses of L0 types are in templates, it is probably fine to have L0 included after this header
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.
I recalled that we tried the same approach with OpenCL headers in the past and it caused some issues, so we include OpenCL headers from SYCL headers.
What is the motivation for this change? Will it be clear for user that includes of Level Zero headers are missing and how to fix this problem?
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 ze_api.h has this
#ifndef _ZE_API_H
but not quite sure what we are trying to solve here. Why we cannot include the ze_api.h in the interop header? We know the interop header is gonna need it anyway, no?
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.
If I understand it correctly, this patch is supposed to address the compile time issue with missing headers on the systems w/o Intel GPU (e.g. cpu-only system or a system with NVIDIA GPU). In these cases DPC++ is not supposed to use Level Zero plug-in and there might be no headers on the system.
I'm not sure that asking users to provide headers in the best option here, but it's one way to address this issue.
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.
@bader You are right.