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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,43 @@ This section covers all other features in the design of oneMKL architecture.

.. _onemkl_spec_current_version:

Current Version of this oneMKL Specification
Specification Version and Compliance
+++++++++++++++++++++++++++++++++++++++++++++

This is the oneMKL specification which is part of the oneAPI specification version 1.0.0.
Each oneMKL domain must define a preprocessor macro to represent the version of the specification that the implementation is compliant with.
vmalia marked this conversation as resolved.
Show resolved Hide resolved
vmalia marked this conversation as resolved.
Show resolved Hide resolved

The macros for each domain are listed as follows:

| ONEMKL_BLAS_SPEC_VERSION
vmalia marked this conversation as resolved.
Show resolved Hide resolved
| ONEMKL_LAPACK_SPEC_VERSION
| ONEMKL_SPBLAS_SPEC_VERSION
| ONEMKL_DFT_SPEC_VERSION
| ONEMKL_RNG_SPEC_VERSION
vmalia marked this conversation as resolved.
Show resolved Hide resolved
| ONEMKL_STATS_SPEC_VERSION
| ONEMKL_VM_SPEC_VERSION

The specification version can be created by appending all digits of the specification version in the format of <MAJOR><MINOR>. MINOR version always uses two digits. This version can be used to check the compatibility of the implementation with the specification version. Note that the revision is not included here because it reflects changes only for the specification document without affecting the implementation. If the implementation is not compliant with any release of the specification, then the macro must have a numerical value of `000`.
vmalia marked this conversation as resolved.
Show resolved Hide resolved

Version Example

| oneAPI 1.1 rev 1 will be represented as a numerical value of 101
| oneAPI 1.2 rev 1 will be represented as a numerical value of 102
| oneAPI 1.2 rev 2 will be represented as a numerical value of 102

Macro Example

.. code-block:: c

// For oneAPI 1.2 rev 1
vmalia marked this conversation as resolved.
Show resolved Hide resolved
#define ONEMKL_BLAS_SPEC_VERSION 102

// For oneAPI 1.2 rev 2
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved
#define ONEMKL_DFT_SPEC_VERSION 102

// For oneAPI 1.3 rev 1
#define ONEMKL_VM_SPEC_VERSION 103

Versioning details are defined here: https://github.com/uxlfoundation/oneAPI-spec/blob/main/doc/versioning.rst#provisional-versions

.. _onemkl_pre_post_conditions:

Expand Down