Skip to content

Only erase image macro definitions for OpenCL 3.0 #410

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 1 commit into from
Apr 6, 2023

Conversation

AGindinson
Copy link

As a follow-up on commit d6563b0, retain default image macro definitions for pre-3.0 standards. It is only with OpenCL 3.0 that Compute Runtime's compiler interface bothers to define the macros for platforms that provide image support.

As a follow-up on commit d6563b0, retain default image macro
definitions for pre-3.0 standards. It is only with OpenCL 3.0 that
Compute Runtime's compiler interface bothers to define the macros for
platforms that provide image support.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson
Copy link
Author

@hewj03 @haonanya @mnaczk Could you please take a look?

Copy link
Contributor

@mnaczk mnaczk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

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

LGTM.

BTW, I'm confused by the sentence "Feature test macros require support for OpenCL C 3.0 or newer." in The OpenCL™ C Specification.
Are the macros also available for OpenCL 1.2 and 2.0?

@AGindinson
Copy link
Author

LGTM.

BTW, I'm confused by the sentence "Feature test macros require support for OpenCL C 3.0 or newer." in The OpenCL™ C Specification. Are the macros also available for OpenCL 1.2 and 2.0?

@hewj03, as far as I understand, it is only with OpenCL 3.0 that the macros can be defined or undefined conditionally, depending on the target platform capabilities, or in other words, can serve as "feature test" macros. This is the exact issue with my initial commit, which assumed that image feature macros (and other "optional core feature" macros) work the same way for OpenCL 2.1

@wenju-he
Copy link
Contributor

wenju-he commented Apr 6, 2023

LGTM.
BTW, I'm confused by the sentence "Feature test macros require support for OpenCL C 3.0 or newer." in The OpenCL™ C Specification. Are the macros also available for OpenCL 1.2 and 2.0?

@hewj03, as far as I understand, it is only with OpenCL 3.0 that the macros can be defined or undefined conditionally, depending on the target platform capabilities, or in other words, can serve as "feature test" macros. This is the exact issue with my initial commit, which assumed that image feature macros (and other "optional core feature" macros) work the same way for OpenCL 2.1

thank you for the answer.

@wenju-he wenju-he merged commit de262c9 into intel:ocl-open-140 Apr 6, 2023
@AGindinson AGindinson deleted the clang-14-image-macro-3_0 branch April 6, 2023 07:46
@AGindinson
Copy link
Author

Thanks Wenju!

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.

3 participants