Skip to content
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

Generate OpenCL C feature dictionary #1166

Open
kpet opened this issue May 10, 2024 · 1 comment
Open

Generate OpenCL C feature dictionary #1166

kpet opened this issue May 10, 2024 · 1 comment

Comments

@kpet
Copy link
Contributor

kpet commented May 10, 2024

The macros for OpenCL C features are currently defined manually in c/feature-dictionary.asciidoc. Here is an example:

// opencl_c_kernel_clock_scope_sub_group
ifdef::backend-html5[]
:opencl_c_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_<wbr>kernel_<wbr>clock_<wbr>scope_<wbr>sub_<wbr>group`]
endif::[]
ifndef::backend-html5[]
:opencl_c_kernel_clock_scope_sub_group: pass:q[`\__opencl_c_&#8203;kernel_&#8203;clock_&#8203;scope_&#8203;sub_&#8203;group`]
endif::[]

Authoring these manually is tedious and error prone. They should be generated from the XML.

@bashbaug
Copy link
Contributor

One of the scripts in #1174 might be useful for generating this in the short term, or for EXT or vendor-specific extensions.

kpet added a commit to kpet/OpenCL-Docs that referenced this issue Jul 17, 2024
Features are stored in a text file for now. Ultimately, we probably
want to use the XML registry for this.

Generation script taken from KhronosGroup#1174 with a few modifications.

Contributes to KhronosGroup#1166.

Signed-off-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Ie2c14148d75457030aa1a97cf601daba2c007397
bashbaug added a commit that referenced this issue Aug 13, 2024
* Generate OpenCL C feature dictionary

Features are stored in a text file for now. Ultimately, we probably
want to use the XML registry for this.

Generation script taken from #1174 with a few modifications.

Contributes to #1166.

Signed-off-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Ie2c14148d75457030aa1a97cf601daba2c007397

* Update scripts/gen_c_feature_dictionary.py

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>

* define __opencl_c_<feature_name> outside of the list of features

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I8e0947c30775338dd70803d09c7059d340e86f5a

---------

Signed-off-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
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

No branches or pull requests

2 participants