-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add framework for extensions in API spec #950
Conversation
cl_khr_integer_dot_product and cl_khr_command_buffer.
api/draft/ -> working versions of extension specs api/draft/Snapshot/ -> latest snapshotted versions of ext/ Initially, these were identical to the published extension specs. This was followed by a lot of markup cleanup and reorganization, moving sections around to separate spec changes from extension appendix / descriptions, adding refpage block headers, cleaning up C function tables, making table headings uniform, using Title Case consistently in section headers, and marking all khr extensions Ratified.
Resulting PDFs tend to be considerably smaller, and also runs about 15% faster when doing a full PDF build (2:39 vs. 3:06 on my machine). The hexapdf tool does need to be installed in the build environment - it is in the khronosgroup/docker-images:asciidoctor-spec Docker image.
Add a workaround for safely importing api.py, so that a missing api.py + empty 'api/' directory don't cause exceptions. Update XML schema to sync with Vulkan insofar as possible.
Add depends / promotedto / supersededby / ratified attributes to XML based on comments in extension specs and feedback from Ben, and start converting extension appendices to use metadata includes. Add missing OpenCL C extensions to cl.xml. This might impact downstream header generation - to be checked. Minor updates to metadocgenerator and conventions for OpenCL
split all extension documents into appendix and body (in draft/app/) files. Move appendices into API spec directory, leaving the bodies to be integrated in api/draft/.
And use Title Case consistently throughout the spec
…on framework in the C spec
Really just improve language describing them, since all the functions were already in the OpenCL C spec as part of OpenCL 1.1.
This is looking really nice! A few comments from a brief review:
|
Yes. I'm holding off on adjusting that sort of stuff in order to do it in one pass. Also there will be some increased autogeneration in the extension appendices before I'm done, for the interface summaries - the existing markup is largely a placeholder from the separate documents.
All the extension appendices in the API spec have been done now, but the actual integration of changes / additions to the spec body remains TBD for a lot of them, which is what I'm focusing on now. Also, I'm not entirely clear on the conventions for the various asciidoctor attributes in the dictionaries so would appreciate some thoughts on (for example) these attributes extracted from the generated api-dictionary.asciidoc:
This is somewhat inconsistent:
ISTM it would be more consistent to have
and no _TYPE suffixes at all (except for API names that actually contain _TYPE, as some enums do). That would cause some markup changes, though most of the 400-odd uses are just basic scalar (cl_uint etc.) names.
Will do.
Also will do. Thanks for the feedback! |
Yes, I agree this is a little confusing. The reason the type names are suffixed with We could have added a suffix to everything but that hasn't been needed so far. IIRC the struct types get handled differently because the struct description gets generated from the XML and included in the spec so we have something to link to. The non-struct types do not, so we do not include a link for them. If we added a description for the other types (say, in an appendix) then we could link to them also, but we do not do this currently, and I'm not sure how much value it would add. |
…y present, but needed minor changes).
@neiltrevett @bashbaug this is ready now. If possible, I recommend merging #1081 to the branch underlying #950 before merging #950. If the WG is not willing to take that step (removing the separate khr extension documents) yet, it can be retargeted to main and deferred. Any outstanding khr extension work in branches should be re-done as part of the API and C specs ASAP, to avoid divergences and rebasing pain. I am pretty confident in how this looks now, but definitely review needed before publishing. I'm sure there will be some minor cleanup to deal with, and it would be an excellent idea to run a link-checker over the C and API specs prior to publication - there are many more internal links and a fair number of external links from the API spec extension appendices into the C spec. I strongly recommend squash-on-merge when accepting #950. There is a huge amount of churn in the commits as this took many months to do incrementally, none of which is of particular interest to downstream extension work. |
Another good consistency check will be a careful comparison of 'makeSpec -spec core chtml apihtml' with the current HTML from main branch. I have not done this for a while and while the differences should not be big, there are unavoidable diffs. N.b. I find 'wdiff -3 new.html old.html' to be quite useful when changes are small. There are some HTML comparison tools we use in Vulkan but they are... not great. I wish I knew of a great one. |
Once we integrate all the khr extensions into the API and C specs, the separate documents under ext/ will serve no purpose and will have the risk of creating divergences between the sme content in the API / C specs and the separate extension spec. This removes the separate khr extension documents from the repo, and strips down the OpenCL Extension spec to just point to the corresponding extension appendix in the API spec. It will also serve as a forcing function for all future extension development to be done against the API / C specs. Any outstanding PRs against these documents will have to be rebased and the same edits reapplied to those specs, whether changes to published extensions or in-flight, but as yet unpublished khr extensions. Ideally this would merge into #950 before that is merged to main, if the WG can agree to that. It could also be retargeted to main instead, if this decision will take longer than the timeframe for merging #950.
Discussed in the March 12th teleconference and agreed to merge these changes in principle. We'll wait for the CI builds to complete and give one more quick review now that #1081 is merged, but assuming all goes well we'll merge these changes ASAP. |
…1084) Net effect is to rearrange the extension appendices so these extensions are no longer in a 'provisional' subsection, and to remove the generated comments about their being provisional from the extension refpages.
@outofcontrol can you please check what's happening with the CLA bot for this PR? Thanks! |
My bad. Used the wrong account for something which ate up the API rate limit for the account we use for cla-assisstant. :( Will be up and running again within the hour. |
@bashbaug if you want, I can just go ahead and merge this - not sure if you have those permissions on the repo or not? You probably should. Since I'm a Khronos member I'm already covered for my contributions. |
CLA-Assistant is responding again. Might be good to close and re-open this PR, have the reviewer sign-off, and the CLA check should then be available. |
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.
Merging as discussed in the March 12th and March 19th teleconferences.
Can someone please explain what exactly being |
Yes, it is similar. Ratification has no effect on developers or users, but is of concern to implementers who want to be sure they do not implement functionality that is not covered by the reciprocal IP licensing obligations of the Khronos IP agreements. It means that Khronos has agreed that a core version or extension is covered by those agreements. There is no obligation or expectation that a ratified extension will become part of a future core API version, and many will not. Conversely non-ratified vendor or multivendor extensions are sometimes promoted to the core API, at which time they are ratified. |
Thanks. Also, in
I would intuitively expect And another thing:
These were probably supposed to use this |
After PR KhronosGroup#950 merged the cl_khr_command_buffer spec needs updated in a couple of places: * Error around _num_queues_ to `clCreateCommandBufferKHR` should be in terms of `cl_khr_command_buffer_multi_device`. * "New Structure" heading can be deleted as these are listed under "New Types" * Typos in rendering of some types
After PR KhronosGroup#950 merged the cl_khr_command_buffer spec needs updated in a couple of places: * Error around _num_queues_ to `clCreateCommandBufferKHR` should be in terms of `cl_khr_command_buffer_multi_device`. * "New Structure" heading can be deleted as these are listed under "New Types" * Typos in rendering of some types
After PR #950 merged the cl_khr_command_buffer spec needs updated in a couple of places: * Error around _num_queues_ to `clCreateCommandBufferKHR` should be in terms of `cl_khr_command_buffer_multi_device`. * "New Structure" heading can be deleted as these are listed under "New Types" * Typos in rendering of some types
Now integrates all khr extensions. Build with all extensions via
$ python3 makeSpec -clean -spec khr apihtml chtml (other 'make' arguments if needed)
or build with no extensions included via
$ python3 makeSpec -clean -spec core
Note: 'makeAll' script has been replaced by 'makeSpec' which has slightly different syntax.