Provide defines for build-time (header) version checks
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- api, build-system
Research direction
The requested change is centered on ze_api.h; start by reviewing the header's existing version information and the release process that updates it. Add build-time version defines usable by C/C++ consumers, and verify that older headers can be distinguished from the minimum version required by a program.
Written by the indexing model from the issue text.
Description
Currently building L0 programs give "mystery" errors if system L0 headers are not new enough.
It would be much user-friendlier if ze_api.h would include defines that can be used to check whether L0 headers are new enough, and which are (automatically) updated on every release.
E.g. with something like this:
#define L0_HEADER_MAJOR 1
#define L0_HEADER_MINOR 9
#define L0_HEADER_PATCHLEVEL 9
#define L0_HEADER_VERSION (L0_HEADER_MAJOR * 10000 + L0_HEADER_MINOR * 100 + L0_HEADER_PATCHLEVEL)
Code could then give much better error:
# if L0_HEADER_VERSION < 10909
# error "At least version v1.9.9 of the L0 header(s) required"
#endif
(L0_HEADER_VERSION obviously assumes that project does not use more than 99 minor & patchlevel versions.)
PS. This is needed because doing package / pkg-config version check is not enough for all cases. Even if system would have new enough version installed from distro packages, code could e.g. be getting some older version from /usr/local/include. Or user could be directly compiling C/C++ files for self-contained L0 utilities.
- Dominant language
- C++
- Stars
- 335
- Forks
- 140
- Avg merge
- 12h 32m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oneapi-src/level-zero
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
oneapi-src/level-zero#495 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oneapi-src/level-zero#485 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
oneapi-src/level-zero#447 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
oneapi-src/level-zero#482 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
oneapi-src/level-zero#419 ·
All issues in oneapi-src/level-zero
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·