[HIPIFY][merge] merge amd-develop into amd-staging#2491
Merged
ranapratap55 merged 4 commits intoamd-stagingfrom Apr 6, 2026
Merged
[HIPIFY][merge] merge amd-develop into amd-staging#2491ranapratap55 merged 4 commits intoamd-stagingfrom
amd-develop into amd-staging#2491ranapratap55 merged 4 commits intoamd-stagingfrom
Conversation
…t test directives` (#2486) [Synopsis] + The removal of redundant `// CHECK:` lookbehinds from AST transformation regexes exposed LLVM `lit` test directives and standard C/C++ comments (`//`, `/* */`) to unintended hipification. + Aggressive global regexes erroneously hipify any multi-line or inline C/C++ comment containing `CUDA` keywords. [Solution] + [Slurp & Regex Tokenization] Leveraged the existing file-slurping architecture (`undef $/;`) to perform global lexical masking across the entire file buffer. + [Lexical Masking] Introduced a `maskComments` subroutine to parse string literals `”..”'` and `'...'` and leave them untouched, while extracting C/C++ comments and replacing them with placeholders `__HIPIFY_COMMENT_X__` before any AST transformations. + [Global Restoration] Implemented `unmaskComments` to accurately restore the original comments and `lit` directives immediately prior to file output. [Impact] + Guarantees 100% preservation of: LLVM `lit` test validation strings (`RUN`, `CHECK, `CHECK-NEXT`, etc., and any other custom directives) and `C/C++ comments`. + Decouples comment preservation from `AST` regex logic, keeping the transformation expressions clean and focused on syntax. [Testing] + `perl -c hipify-perl` + Validated against all `hipify-clang` unit tests, ensuring no validation strings or comment blocks are mutated during the hipification process.
…ce` - Part 2 - `Functions` - final (#2487) + Updated the regenerated `hipify-perl` and `FFT` `CUDA2HIP` docs accordingly
…E` (#2489) + Updated the regenerated `hipify-perl` and `SPARSE` `CUDA2HIP` docs accordingly
amd-develop into amd-staging
This was referenced Apr 6, 2026
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.
No description provided.