Enable restore_tracker usage in device kernels - #1893
Merged
vgvassilev merged 1 commit intoJul 21, 2026
Conversation
| #include <utility> | ||
| #include <vector> | ||
| #ifndef Max_Records | ||
| #define Max_Records 64 |
Contributor
There was a problem hiding this comment.
warning: macro 'Max_Records' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage]
#define Max_Records 64
^| #define Max_Records 64 | ||
| #endif | ||
| #ifndef Max_Bytes | ||
| #define Max_Bytes 1024 |
Contributor
There was a problem hiding this comment.
warning: macro 'Max_Bytes' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage]
#define Max_Bytes 1024
^
Vedant2005goyal
force-pushed
the
RestoreTracker_Device
branch
from
July 15, 2026 14:55
26a3dce to
cea09e7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Vedant2005goyal
force-pushed
the
RestoreTracker_Device
branch
2 times, most recently
from
July 20, 2026 05:05
26fbae1 to
5a37280
Compare
Owner
|
Can we explain in the commit message the idea of that change. Also maybe update the pr description. |
Vedant2005goyal
force-pushed
the
RestoreTracker_Device
branch
2 times, most recently
from
July 20, 2026 17:14
345a235 to
29376ac
Compare
Contributor
Author
Done |
Owner
|
Let’s add a test that did not work with cuda in the past and now passes. |
Vedant2005goyal
force-pushed
the
RestoreTracker_Device
branch
from
July 21, 2026 11:08
29376ac to
071f30b
Compare
Replace the STL-based implementation of clad::restore_tracker with a device-compatible implementation. The previous implementation relied on std::vector and std::map, which are unavailable in device code, preventing restore_tracker from being used inside GPU kernels.
Vedant2005goyal
force-pushed
the
RestoreTracker_Device
branch
from
July 21, 2026 16:44
071f30b to
6425961
Compare
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.
This PR enables
clad::restore_trackerto work correctly inside GPU kernels. The previous implementation relied on STL containers such asstd::vectorandstd::map, which are not supported in device code, causing compilation failures or runtime crashes when restore_tracker was used within GPU kernels.