-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rocm-compilersupport: update to 6.0.0
Signed-off-by: Gavin Zhao <git@gzgz.dev>
- Loading branch information
1 parent
1bd9af7
commit 507a817
Showing
13 changed files
with
303 additions
and
2,126 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
ld-linux-x86-64.so.2 | ||
libLLVM-16.so | ||
libc.so.6 | ||
libgcc_s.so.1 | ||
libm.so.6 | ||
libncursesw.so.6 | ||
libstdc++.so.6 | ||
libz.so.1 | ||
libzstd.so.1 |
2,106 changes: 198 additions & 1,908 deletions
2,106
packages/r/rocm-compilersupport/abi_used_symbols
Large diffs are not rendered by default.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
...r/rocm-compilersupport/files/0001-Extend-ROCm-CompilerSupport-HIP-ISA-compatibility.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
From 3419d519fca9b03ba82dde037cc4600348a9d71d Mon Sep 17 00:00:00 2001 | ||
From: Gavin Zhao <git@gzgz.dev> | ||
Date: Tue, 20 Feb 2024 15:04:20 -0500 | ||
Subject: [PATCH] Extend ROCm-CompilerSupport HIP ISA compatibility | ||
|
||
Inspired by a similar patch by @cgmb to clr/hipamd. | ||
|
||
Signed-off-by: Gavin Zhao <git@gzgz.dev> | ||
--- | ||
lib/comgr/src/comgr-metadata.cpp | 45 +++++++++++++++++++++++++++++++- | ||
1 file changed, 44 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/lib/comgr/src/comgr-metadata.cpp b/lib/comgr/src/comgr-metadata.cpp | ||
index a3375b4..0769c87 100644 | ||
--- a/lib/comgr/src/comgr-metadata.cpp | ||
+++ b/lib/comgr/src/comgr-metadata.cpp | ||
@@ -923,6 +923,48 @@ static constexpr const char *CLANG_OFFLOAD_BUNDLER_MAGIC = | ||
static constexpr size_t OffloadBundleMagicLen = | ||
strLiteralLength(CLANG_OFFLOAD_BUNDLER_MAGIC); | ||
|
||
+struct GfxPattern { | ||
+ StringRef root; | ||
+ StringRef suffixes; | ||
+}; | ||
+ | ||
+static bool matches(const GfxPattern& p, const StringRef s) { | ||
+ if (p.root.size() + 1 != s.size()) { | ||
+ return false; | ||
+ } | ||
+ if (0 != std::memcmp(p.root.data(), s.data(), p.root.size())) { | ||
+ return false; | ||
+ } | ||
+ return p.suffixes.find(s[p.root.size()]) != std::string::npos; | ||
+} | ||
+ | ||
+ | ||
+static bool isGfx900CompatibleProcessor(const StringRef processor) { | ||
+ return matches(GfxPattern{"gfx90", "029c"}, processor); | ||
+} | ||
+ | ||
+static bool isGfx1030CompatibleProcessor(const StringRef processor) { | ||
+ return matches(GfxPattern{"gfx103", "0123456"}, processor); | ||
+} | ||
+ | ||
+static bool isGfx1010CompatibleProcessor(const StringRef processor) { | ||
+ return matches(GfxPattern{"gfx101", "0123456"}, processor); | ||
+} | ||
+ | ||
+static bool isProcessorsCompatible(const StringRef processor1, const StringRef processor2) { | ||
+ if (processor1 == processor2) { | ||
+ return true; | ||
+ } else if (isGfx900CompatibleProcessor(processor1) && isGfx900CompatibleProcessor(processor2)) { | ||
+ return true; | ||
+ } else if (isGfx1030CompatibleProcessor(processor1) && isGfx1030CompatibleProcessor(processor2)) { | ||
+ return true; | ||
+ } else if (isGfx1010CompatibleProcessor(processor1) && isGfx1010CompatibleProcessor(processor2)) { | ||
+ return true; | ||
+ } else { | ||
+ return false; | ||
+ } | ||
+} | ||
+ | ||
bool isCompatibleIsaName(StringRef IsaName, StringRef CodeObjectIsaName) { | ||
if (IsaName == CodeObjectIsaName) { | ||
return true; | ||
@@ -938,7 +980,8 @@ bool isCompatibleIsaName(StringRef IsaName, StringRef CodeObjectIsaName) { | ||
return false; | ||
} | ||
|
||
- if (CodeObjectIdent.Processor != IsaIdent.Processor) { | ||
+ if (CodeObjectIdent.Processor != IsaIdent.Processor | ||
+ && !isProcessorsCompatible(CodeObjectIdent.Processor, IsaIdent.Processor)) { | ||
return false; | ||
} | ||
|
||
-- | ||
2.43.1 | ||
|
26 changes: 0 additions & 26 deletions
26
packages/r/rocm-compilersupport/files/0001-None-std-nullopt.patch
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...ocm-compilersupport/files/0002-llvm-merge-add-include-of-lld-Common-CommonLinkerCon.patch
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...s/r/rocm-compilersupport/files/0003-llvm-move-to-inverted-OPT_mrelax_relocations_no.patch
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
.../r/rocm-compilersupport/files/0004-llvm-merge-Move-to-Expected-on-SubtargetFeatures.patch
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
packages/r/rocm-compilersupport/files/0005-Remove-h-option-from-comgr-objdump.patch
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...s/r/rocm-compilersupport/files/0006-Replacing-deprecated-llvm-None-with-std-nullopt.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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