Skip to content

Commit

Permalink
Add framework for extensions in API spec (#950)
Browse files Browse the repository at this point in the history
* Add framework for extensions in API spec and examples for
cl_khr_integer_dot_product and cl_khr_command_buffer.

* Add uncommitted file

* Complete adding cl_khr_integer_dot_product to API and C specs

* Add external memory extensions

* Bring cl_khr_command_buffer up to date with latest provisional updates

* Add cl_khr_semaphore.

* Add build script

* Working snapshots

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.

* Update NOTES

* Use hexapdf instead of ghostscript for PDF optimization

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.

* Roughly sync with Vulkan scripts, then add CL customizations.

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.

* Replace extension names with links to extension appendices

* Add framework for extension metadata includes in build and scripts.

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 documents containing multiple extensions into separate files, and
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/.

* Script fixes for extension/version link markup, and add provisional tags to XML

* Remove workarea files not needed in this branch

* Change to SPDX ID

* Add cl_khr_external_semaphore* extension language

And use Title Case consistently throughout the spec

* Add cl_khr_subgroup* extensions, mostly to OpenCL C spec, and extension framework in the C spec

* Add cl_khr_{global,local}_int32_{base,extended}_atomics extensions

Really just improve language describing them, since all the functions
were already in the OpenCL C spec as part of OpenCL 1.1.

* Add cl_khr_fp64 extension language (virtually all of which was already present, but needed minor changes).

* Add most remaining khr extensions to the API and C language specs:

* cl_khr_async_work_group_copy_fence
* cl_khr_device_enqueue_local_arg_types
* cl_khr_device_uuid
* cl_khr_extended_async_copies
* cl_khr_extended_bit_ops
* cl_khr_extended_versioning
* cl_khr_gl_depth_images
* cl_khr_gl_event
* cl_khr_gl_msaa_sharing
* cl_khr_gl_sharing
* cl_khr_global_int32_base_atomics
* cl_khr_global_int32_extended_atomics
* cl_khr_icd
* cl_khr_il_program
* cl_khr_image2d_from_buffer
* cl_khr_initialize_memory
* cl_khr_int64_base_atomics
* cl_khr_int64_extended_atomics
* cl_khr_local_int32_base_atomics
* cl_khr_local_int32_extended_atomics
* cl_khr_mipmap_image
* cl_khr_mipmap_image_writes
* cl_khr_pci_bus_info
* cl_khr_priority_hints
* cl_khr_srgb_image_writes
* cl_khr_suggested_local_work_size
* cl_khr_terminate_context
* cl_khr_throttle_hints
* cl_khr_work_group_uniform_arithmetic

There are about a dozen remaining extensions, mostly DX / EGL sharing
related.

* Add extension language for

* cl_khr_create_command_queue
* cl_khr_d3d10_sharing
* cl_khr_d3d11_sharing
* cl_khr_dx9_media_sharing
* cl_khr_egl_event
* cl_khr_egl_image

* Fix SPDX typo

* Fix dependency generation

* Move asciidoc dependency generation into a separate shell script

Executing the updated version under Travis CI (but not locally) was
failing for no apparent reason.

* Add new python dependency

* Add extension language for

* cl_khr_command_buffer
* cl_khr_command_buffer_multi_device
* cl_khr_command_buffer_mutable_dispatch
* cl_khr_pci_bus_info
* cl_khr_select_fprounding_mode
* cl_khr_spir

Also some minor cleanup / consistency edits in related markup.

* Add cl_khr_fp16 and some missing cl_khr_depth_images extension language.

Some table and section heading markup / capitalization cleanup.

* Update api/appendix_e.asciidoc

Co-authored-by: Ewan Crawford <ewan@codeplay.com>

* Update api/appendix_e.asciidoc

Co-authored-by: Ewan Crawford <ewan@codeplay.com>

* Resolve #950 (comment)

* Remove language in cl_khr_*_int32_*_atomics appendices saying that ''the volatile qualifier was added''

Closes #1013

* update

* Various minor fixes to the build process

Add 'makeSpec' script, replacing 'makeAll', and document it in
README.adoc.
Use `makeSpec -spec khr [make targets]` instead of `makeAll [make
targets\`

Remove static refpage source which is now extracted from the
specification source, including various KHR extension API refpages and
extension appendix refpages.

Minor fixes to refpage extraction scripts.

Remove version dependencies from `depends` attributes in cl.xml, which
are not yet supported in the schema or the scripts which consume this
attribute for `makeSpec`, and move them to `comment` attributes for the
time being.

* Minor script fixes. Try to build both core and khr targets in Travis CI.

* Attempt to install needed python package

* Bring extensions up to date with main at commit c66cb82

All extensions in the API and C specs should now be consistent with the ext/ directory.

* Cleanup and minor fixes / improvements

Add links from the API spec extension appendices to the corresponding
extension section of the C language spec.

Markup fixes for a few asciidoc conditional typos.

Add a few missing extension sections to the C language spec.

Modify makeAll script to interpret '-spec all' as '-spec khr', since
there are no extension appendices or other content for non-khr
extensions at present, and building with all extensions causes problems
in the document pipeline.

* Removing separate OpenCL Extensions from the repository (#1081)

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.

* Update XML to mark recently ratified extensions as non-provisional (#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.

---------

Co-authored-by: Ewan Crawford <ewan@codeplay.com>
  • Loading branch information
oddhack and EwanC authored Mar 20, 2024
1 parent c66cb82 commit 774425a
Show file tree
Hide file tree
Showing 242 changed files with 26,856 additions and 31,197 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ rvm:
- 2.7.1

before_install:
- sudo apt-get install -y libpango1.0-dev ghostscript fonts-lyx jing
- sudo apt-get install -y libpango1.0-dev ghostscript fonts-lyx jing libavalon-framework-java libbatik-java python3-pyparsing
- gem install asciidoctor -v 2.0.16
- gem install coderay -v 1.1.1
- gem install rouge -v 3.19.0
- gem install ttfunk -v 1.5.1
- gem install hexapdf -v 0.27.0
- gem install asciidoctor-pdf -v 1.5.0
- gem install asciidoctor-mathematical -v 0.3.5
- pip install pyparsing

script:
- git describe --tags --dirty
- make -O -j 5 api c env ext cxx4opencl manhtmlpages
- make -C xml validate
- python3 makeSpec -clean -spec core OUTDIR=out.core -j 5 api c env ext cxx4opencl
- python3 makeSpec -clean -spec khr OUTDIR=out.khr -j 12 html manhtmlpages

deploy:
provider: releases
api_key: $GH_TOKEN
file_glob: true
file: out/pdf/*
file: out.*/pdf/*
skip_cleanup: true
on:
tags: true
Expand Down
Loading

0 comments on commit 774425a

Please sign in to comment.