This revision was automatically updated to reflect the committed changes.
Closed by commit rG282bf9eaf7b1: [HIP] Fix ROCm detection (authored by yaxunl).
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98867/new/
https://
tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:269
+if (Loc != StringRef::npos)
+ VerStr[Loc] = '.';
+V.tryParse(VerStr);
yaxunl wrote:
> tra
yaxunl updated this revision to Diff 332104.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
revised by Artem's comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98867/new/
https://reviews.llvm.org/D98867
Files:
clang/lib/Driver/ToolChains/AMDGPU.cpp
clang/tes
yaxunl marked 2 inline comments as done.
yaxunl added inline comments.
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:267-268
+// rocm-{major}.{minor}.{subMinor}[-{build}]
+auto Loc = StringRef(VerStr).rfind('_');
+if (Loc != StringRef::npos)
+ VerStr[Loc] =
tra added inline comments.
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:267-268
+// rocm-{major}.{minor}.{subMinor}[-{build}]
+auto Loc = StringRef(VerStr).rfind('_');
+if (Loc != StringRef::npos)
+ VerStr[Loc] = '.';
You don't need `String
yaxunl updated this revision to Diff 331889.
yaxunl marked an inline comment as done.
yaxunl added a comment.
fix version comparison
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98867/new/
https://reviews.llvm.org/D98867
Files:
clang/lib/Driver/ToolChains/AMDGPU.cpp
clang/test/Dri
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:271
+}
+if (LatestROCm < FileName)
+ LatestROCm = FileName.str();
tra wrote:
> This will rank `rocm-3.9` higher than `rocm-3.10`
tra added inline comments.
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:271
+}
+if (LatestROCm < FileName)
+ LatestROCm = FileName.str();
This will rank `rocm-3.9` higher than `rocm-3.10`. I think you do need to
extract and compare the version
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added subscribers: kerbowa, nhaehnle, jvesely.
yaxunl requested review of this revision.
ROCm has changed installation path to /opt/rocm-{release}. Add detection
for that. Also support ROCM_PATH environment variable.
https://revi