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

[RFC|oneMKL]Enable programmatic versioning #561

Merged
merged 20 commits into from
Sep 30, 2024

Conversation

vmalia
Copy link
Contributor

@vmalia vmalia commented Aug 5, 2024

Motivation

Inspiration

  • SYCL versioning does not add the revision number:

image

  • OpenMP specification itself keeps only MAJOR.MINOR version, with ongoing progress marked as Technical Report <number>. The _OPENMP macro provides a release date which maps onto a specification version, like this:
#define _OPENMP 202111    //202111: OpenMP 5.2

Proposal

  • <MAJOR><MINOR><REVISION> such that MINOR and REVISION have two digits.
  • Propose a macro for oneAPI and suggest a naming scheme for component macro names.

@rscohn2
Copy link
Member

rscohn2 commented Aug 6, 2024

@uxlfoundation/oneapi-spec-maintainers: Please review this versioning proposal

doc/versioning.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewtbarker andrewtbarker left a comment

Choose a reason for hiding this comment

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

I do not understand what is being proposed here.

Is the idea that each implementation of the spec gets to decide how to provide a version to the user (whether by a version string, a #define, an int getSpecVersion() function)? Then this change to the spec only specifies that the end of this string/macro/int has a certain representation?

doc/versioning.rst Outdated Show resolved Hide resolved
doc/versioning.rst Outdated Show resolved Hide resolved
doc/versioning.rst Outdated Show resolved Hide resolved
@vmalia vmalia changed the title [RFC][oneMKL]Enable programmatic versioning [RFC]Enable programmatic versioning Aug 20, 2024
doc/versioning.rst Outdated Show resolved Hide resolved
@vmalia
Copy link
Contributor Author

vmalia commented Aug 20, 2024

Is the idea that each implementation of the spec gets to decide how to provide a version to the user (whether by a version string, a #define, an int getSpecVersion() function)? Then this change to the spec only specifies that the end of this string/macro/int has a certain representation?

Yes. The goal of this RFC is to ensure that every implementation of the spec provides a numerically comparable value for its compliance with the spec version, through the proposed macros.

The implementation can additionally provide more ways to query that information, like APIs, but we do not mandate that in this proposal.

doc/versioning.rst Outdated Show resolved Hide resolved
@vmalia
Copy link
Contributor Author

vmalia commented Sep 4, 2024

@akukanov @mkrainiuk @rscohn2 @spencerpatty if everything looks okay, then please provide your approval. Thank you!

@vmalia vmalia changed the title [RFC]Enable programmatic versioning [RFC|oneMKL]Enable programmatic versioning Sep 4, 2024
Copy link
Contributor

@spencerpatty spencerpatty left a comment

Choose a reason for hiding this comment

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

Acceptable from my perspective. Approved

@vmalia
Copy link
Contributor Author

vmalia commented Sep 17, 2024

@aelizaro @paveldyakov @lhuot @zettai-reido @sknepper can you please provide your reviews? Thank you!

@akukanov
Copy link
Contributor

For your information, below is what I propose for defining a spec version macro for oneDPL. Use as you like; in case of feedback please comment in the PR #591.

A oneDPL implementation must define a preprocessor macro representing the version
of the oneDPL specification that the implementation is compliant with.

.. code:: cpp
  // Defined in <oneapi/dpl/version>
  #define ONEDPL_SPEC_VERSION /*implementation-defined*/

The ``ONEDPL_SPEC_VERSION`` macro must be defined to the decimal literal which value equals to
*major-spec-version* * 100 + *minor-spec-version*, where *major-spec-version* and *minor-spec-version*
are the major and the minor versions of the latest fully supported specification.
[*Example*: ``#define ONEDPL_SPEC_VERSION 104`` for the oneDPL specification 1.4.  -- *end example*]

@vmalia

This comment was marked as resolved.

@mkrainiuk mkrainiuk merged commit 89d1dc7 into uxlfoundation:main Sep 30, 2024
3 checks passed
@vmalia vmalia deleted the dev/vmalia/sem_ver branch October 1, 2024 17:25
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.

10 participants