Skip to content

Commit 17d2e2d

Browse files
authored
[SYCL][COMPAT] Add version & release process (#14457)
This PR defines a version for SYCLcompat via `SYCLCOMPAT_VERSION` and related macros. It also defines a release process for SYCLcompat with respect to oneAPI's product releases. --------- Signed-off-by: Joe Todd <[email protected]>
1 parent 3caa78e commit 17d2e2d

File tree

3 files changed

+72
-8
lines changed

3 files changed

+72
-8
lines changed

sycl/doc/syclcompat/README.md

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@ themselves with the core SYCL API.
1717
* Clear distinction between core SYCL API and the compatibility interface via
1818
separate namespaces.
1919

20-
## Important Disclaimer
21-
22-
SYCLcompat state is experimental. Its functionalities have been implemented but
23-
are not assured to remain consistent in the future. The API is subject to
24-
potential disruptions with new updates, so exercise caution when using it.
25-
2620
## Notice
2721

28-
Copyright © 2023-2023 Codeplay Software Limited. All rights reserved.
22+
Copyright © 2023-2024 Codeplay Software Limited. All rights reserved.
2923

3024
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks of
3125
The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
@@ -72,6 +66,55 @@ This document presents the public API under the [Features](#features) section,
7266
and provides a working [Sample code](#sample-code) using this library. Refer to
7367
those to learn to use the library.
7468

69+
## Versioning
70+
71+
SYCLcompat adopts [semantic versioning](https://semver.org/)
72+
(`major.minor.patch`) in a manner which aligns with oneAPI releases. Each oneAPI
73+
product release has an associated SYCLcompat release. Between oneAPI releases,
74+
there will be at most one `major` or `minor` bump. In other words, if a given
75+
oneAPI release has SYCLcompat version `1.0.0`, the next release will have either
76+
`1.1.0` or, if breaking changes have been made, `2.0.0`. This guarantee has
77+
implications for code merged to the `sycl` branch, described below.
78+
79+
Between release cycles, ongoing updates to SYCLcompat (including possibly
80+
breaking changes) are merged into DPC++ via PRs to the
81+
[`sycl`](https://github.com/intel/llvm/tree/sycl) branch. If a PR introduces the
82+
*first* breaking changes since the last release, that PR must bump to the next
83+
`major` version. Otherwise, if the PR introduces *new functionality* and neither
84+
the `major` nor `minor` have been bumped since the last release, it must bump to
85+
the next `minor` release. If a PR introduces important bugfixes to existing
86+
functionality, `patch` should be bumped, and there are no limits to how many
87+
`patch` bumps can occur between release cycles.
88+
89+
### Release Process
90+
91+
Once all changes planned for a release have been merged, the release process is
92+
defined as:
93+
94+
1. Check the `major.minor` version associated with the *previous* release.
95+
2. Confirm the version bump process outlined above has been followed.
96+
3. If no version bump has occurred since previous release, bump to next `minor`.
97+
4. oneAPI release is delivered.
98+
5. Tag the SYCLcompat release on DPC++ repo: `SYCLcompat-major.minor.0`.
99+
100+
### Deprecation Process/Breaking Changes
101+
102+
As outlined above, SYCLcompat may sometimes make API breaking changes, indicated
103+
with a `major` version bump. Advanced notice (at least one major oneAPI release)
104+
will be provided via a deprecation warning on the relevant APIs, indicating to
105+
the user which alternative API should be used instead.
106+
107+
Note that SYCLcompat is currently in pre-release, and until version `1.0.0` we
108+
do not consider our API to be stable, and may change it with shorter notice.
109+
110+
### Changelog
111+
112+
Since SYCLcompat releases are aligned with oneAPI product releases, the changelog for SYCLcompat is incorporated into [SYCL's Release Notes](https://github.com/intel/llvm/blob/sycl/sycl/ReleaseNotes.md).
113+
114+
### Experimental Namespace
115+
116+
SYCLcompat provides some new experimental features in the `syclcompat::experimental` namespace. This serves as a testing ground for new features which are expected to migrate to `syclcompat::` in time, but the developers do not guarantee either API stability or continued existence of these features; they may be modified or removed without notice. When features are migrated from `syclcompat::experimental` to `syclcompat::`, this will be treated as a `minor` version bump.
117+
75118
## Features
76119

77120
### dim3

sycl/include/syclcompat/defs.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ template <int Arg> class syclcompat_kernel_scalar;
5555
#define SYCLCOMPAT_EXPORT
5656
#endif
5757

58+
#define SYCLCOMPAT_MAJOR_VERSION 0
59+
#define SYCLCOMPAT_MINOR_VERSION 1
60+
#define SYCLCOMPAT_PATCH_VERSION 0
61+
62+
#define SYCLCOMPAT_MAKE_VERSION(_major, _minor, _patch) \
63+
((1E6 * _major) + (1E3 * _minor) + _patch)
64+
65+
#define SYCLCOMPAT_VERSION \
66+
SYCLCOMPAT_MAKE_VERSION(SYCLCOMPAT_MAJOR_VERSION, SYCLCOMPAT_MINOR_VERSION, \
67+
SYCLCOMPAT_PATCH_VERSION)
68+
5869
namespace syclcompat {
5970
enum error_code { SUCCESS = 0, BACKEND_ERROR = 1, DEFAULT_ERROR = 999 };
6071
}

sycl/test-e2e/syclcompat/defs.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,19 @@ void test_check_error() {
6161
SYCLCOMPAT_CHECK_ERROR(runtime_error_throw()));
6262
}
6363

64+
void test_version() {
65+
// Check the composition of the version int
66+
assert(SYCLCOMPAT_MAKE_VERSION(1, 1, 1) == 1001001);
67+
assert(SYCLCOMPAT_MAKE_VERSION(9, 0, 0) == 9000000);
68+
69+
// Check some inequalities
70+
assert(SYCLCOMPAT_MAKE_VERSION(0, 1, 1) > SYCLCOMPAT_MAKE_VERSION(0, 1, 0));
71+
assert(SYCLCOMPAT_MAKE_VERSION(1, 0, 0) > SYCLCOMPAT_MAKE_VERSION(0, 9, 0));
72+
}
73+
6474
int main() {
6575
test_align();
6676
test_check_error();
67-
77+
test_version();
6878
return 0;
6979
}

0 commit comments

Comments
 (0)