-
Notifications
You must be signed in to change notification settings - Fork 93
[SYCLomatic] Emit the verified component version. #2855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: SYCLomatic
Are you sure you want to change the base?
Conversation
Signed-off-by: Chen, Sheng S <[email protected]>
Signed-off-by: Chen, Sheng S <[email protected]>
Signed-off-by: Chen, Sheng S <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
Signed-off-by: Shengchenj <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability for SYCLomatic to parse a supported-components YAML file, verify which components were used in migrations, and emit compatibility version information via a new --supported-components
flag.
- Introduce a YAML schema stub (
component_version.yaml
) to list supported components and their versions - Implement parsing, status tracking, and display logic in a new
ComponentVersion
module - Wire up a
--supported-components
command-line option and invoke the display routine in the DPCT driver
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
clang/tools/dpct/extensions/supported_components/component_version.yaml | Added stub schema for supported-components configuration |
clang/tools/dpct/extensions/CMakeLists.txt | Included and installed the new YAML schema file |
clang/lib/DPCT/FileGenerator/GenFiles.cpp | Added GenVerifiedCmpVer to collect and record used components |
clang/lib/DPCT/DPCT.cpp | Loaded the YAML at startup and hooked up --supported-components |
clang/lib/DPCT/ComponentVersion/ComponentVersion.h | Declared types and APIs for parsing and displaying component info |
clang/lib/DPCT/ComponentVersion/ComponentVersion.cpp | Implemented YAML traits, parsing, and display routines |
clang/lib/DPCT/CMakeLists.txt | Added ComponentVersion.cpp to the DPCT library targets |
clang/lib/DPCT/AnalysisInfo.h | Added storage and accessors for compatible component status |
clang/lib/DPCT/AnalysisInfo.cpp | Defined static members for component status and flag |
clang/include/clang/DPCT/DPCTOptions.inc | Added the supported-components command-line option |
Comments suppressed due to low confidence (4)
clang/lib/DPCT/AnalysisInfo.h:1617
- [nitpick] The flag name
CompatibleComps
is ambiguous. Consider renaming it to something more descriptive likePrintSupportedComponents
orShowSupportedComponents
to clarify its purpose.
static bool CompatibleComps;
clang/tools/dpct/extensions/supported_components/component_version.yaml:6
- [nitpick] The comment
Time Stamp of component
is vague. Specify the expected format (e.g., a numeric version string like1.2.3
) to help contributors understand how to populateSupportedVersion
.
# SupportedVersion: Time Stamp of component
clang/lib/DPCT/ComponentVersion/ComponentVersion.h:46
- The new function
parseSupportComponentStatus
and the display routines lack dedicated unit or integration tests. Consider adding tests that load a samplecomponent_version.yaml
and verify the parsed output and display formatting.
void parseSupportComponentStatus(
clang/lib/DPCT/DPCT.cpp:993
- The identifier
CompatibleComps
is not declared in this scope. You likely intended to reference the static memberDpctGlobalInfo::CompatibleComps
or capture the parsed option into a local variable before use.
if (CompatibleComps) {
auto CompStatusList = dpct::DpctGlobalInfo::getCompatibleCompsStatus(); | ||
auto CompsInfo = dpct::DpctGlobalInfo::getSupportedComponentInfo(); | ||
for (auto CompStatus : CompStatusList) { | ||
for (auto Repl : MainSrcFilesRepls) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop copies each Replacement
by value. Change to for (const auto &Repl : MainSrcFilesRepls)
to avoid unnecessary copies.
for (auto Repl : MainSrcFilesRepls) { | |
for (const auto &Repl : MainSrcFilesRepls) { |
Copilot uses AI. Check for mistakes.
No description provided.