Repository navigation
Introduce HIP_FORCE_API_VERSION for API versioning - #11340
Merged
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
chrispaquot
approved these changes
Sep 9, 2026
Do not pollute sources with #define macros. This commit no longer relies on macro pollution in existing clr code base. Also migrate the header generation script into Python3. Traversal order of Python dictionary has changed so the order is slightly different than before. Introduce HIP_ABI_IMPL for clr, hrr and hip-tests.
hipStreamSet/GetAttribute (and graph kernel-node attribute APIs) are defined in source via the hipStreamAttrID/hipStreamAttrValue alias macros, while the etalon is parsed from the preprocessed header where cpp has expanded them to hipLaunchAttributeID/hipLaunchAttributeValue. The string type-compare saw a mismatch, treated the APIs as non-public overloads, and dropped their profiling callbacks from hip_prof_str.h. On mismatch, lazily build a map of object-like #define type aliases and re-compare after resolving transitively. The alias #defines live in the source API headers that the build cat's into new_header.h before preprocessing; because they are cat'd (not #include'd) their bodies carry no per-source cpp line-marker, so scan the raw cat'd header directly (the .i input minus its suffix), plus any hip headers named by line-markers. Only suppresses spelling differences; real type drift still warns.
mikeqinamd
force-pushed
the
users/mqin/api-versioning
branch
from
September 10, 2026 03:56
b5e4766 to
d6d0db7
Compare
mikeqinamd
force-pushed
the
users/mqin/api-versioning
branch
from
September 10, 2026 14:05
d6d0db7 to
ac45bd5
Compare
Contributor
TheRock Submodule Bump ActivityNewest first
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When we release a new version, we would like to ensure that older applications still compile with the new header. This PR introduces
HIP_FORCE_API_VERSIONto specify which API version the application wants to use. By default, it uses the latest version. Older applications can define an olderHIP_FORCE_API_VERSIONincflags.It removes the old
#defineapproach so that we do not pollute the application with macros.This is the second attempt. The first attempt: #10358
Issue Tracking
JIRA ID : AIRUNTIME-2713
Test Result
The first attempt was reverted because it broke rccl tests. Later, rccl tests was fixed by #11160
I've compiled with all components in TheRock monorepo. All builds fine.
Submission Checklist