EthanLuisMcDonough wrote:
> > > For some codes, I get the following error for a gfx906:
> > > ```
> > > LLVM ERROR: Relocation for CG Profile could not be created: unknown
> > > relocation name
> > > ```
>
> > Not sure if this is still relevant, but I think #114617 should fix this
> > issue.
EthanLuisMcDonough wrote:
> For some codes, I get the following error for a gfx906:
>
> ```
> LLVM ERROR: Relocation for CG Profile could not be created: unknown
> relocation name
> ```
>
> I see it for OpenMC, but the following is a simpler example:
>
> ```
> $ cat test.c
> #include
> #inc
@@ -985,7 +990,8 @@ void FunctionInstrumenter::instrument() {
Intrinsic::getDeclaration(&M, PGOBlockCoverage
? Intrinsic::instrprof_cover
: Intrinsic::instrprof_increment),
-{Nam
https://github.com/EthanLuisMcDonough closed
https://github.com/llvm/llvm-project/pull/102691
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/102691
>From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 28 Jun 2024 12:39:19 -0500
Subject: [PATCH 1/6] Changes from old gpuprof branch
---
clan
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/102691
>From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 28 Jun 2024 12:39:19 -0500
Subject: [PATCH 1/6] Changes from old gpuprof branch
---
clan
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/102691
>From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 28 Jun 2024 12:39:19 -0500
Subject: [PATCH 1/5] Changes from old gpuprof branch
---
clan
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/102691
>From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 28 Jun 2024 12:39:19 -0500
Subject: [PATCH 1/4] Changes from old gpuprof branch
---
clan
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/102691
>From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 28 Jun 2024 12:39:19 -0500
Subject: [PATCH 1/4] Changes from old gpuprof branch
---
clan
https://github.com/EthanLuisMcDonough created
https://github.com/llvm/llvm-project/pull/102691
This pull request is a revised version of #76587. This pull request fixes some
build issues that were present in the previous version of this change.
> This pull request is the first part of an ongoi
EthanLuisMcDonough wrote:
> Yes of course:
>
> ```
> cmake \
> -DCMAKE_BUILD_TYPE=Release \
> -DCMAKE_INSTALL_PREFIX=~/rocm/trunk_1.0 \
> -DLLVM_ENABLE_PROJECTS="clang;lld;llvm;clang-tools-extra;compiler-rt;flang"
> \
> -DLLVM_LIT_ARGS="-vv --show-unsupported --show-xfail -j 32" \
> -
Author: Ethan Luis McDonough
Date: 2024-06-28T12:30:45-05:00
New Revision: 2c8b912f630f9ec647a4870b9c5ee922c2ec1298
URL:
https://github.com/llvm/llvm-project/commit/2c8b912f630f9ec647a4870b9c5ee922c2ec1298
DIFF:
https://github.com/llvm/llvm-project/commit/2c8b912f630f9ec647a4870b9c5ee922c2ec129
EthanLuisMcDonough wrote:
> I'm building on an x86 + AMD GPU. What fails is this command:
>
> ```
> [8/14] Performing build step for 'runtimes'
> [1/4] Linking CXX shared library
> /home/dobercea/upstream/llvm-project/build/lib/libomptarget.so.19.0git
> FAILED: /home/dobercea/upstream/llvm-proj
EthanLuisMcDonough wrote:
Which platform are you building this on?
https://github.com/llvm/llvm-project/pull/76587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough closed
https://github.com/llvm/llvm-project/pull/76587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough edited
https://github.com/llvm/llvm-project/pull/93365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/23] Add profiling functions to libomptarget
EthanLuisMcDonough wrote:
> Is this something that specifically requires its own flag? Or could we just
> do `-Xarch_device -fprofile-generate`.
Right now the `-fprofile-generate-gpu` and `-fprofile-instr-generate-gpu` flags
make sure that the compiler-rt profiling library is included even if
EthanLuisMcDonough wrote:
@jhuber6 The clang format errors are mostly due to my local version of
`clang-format` disagreeing with the buildbot's version. Its a bit annoying, but
it shouldn't be too much of a problem given I plan on squashing and merging
once this gets approved.
I added new fla
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/30] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/21] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/29] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/29] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough ready_for_review
https://github.com/llvm/llvm-project/pull/93365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/28] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/93365
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/27] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough created
https://github.com/llvm/llvm-project/pull/93365
This pull request is the second part of an ongoing effort to extends PGO
instrumentation to GPU device code and depends on #76587. This PR makes the
following changes:
- Introduces `__llvm_write_cust
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/20] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/18] Add profiling functions to libomptarget
@@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type
*DstTy,
Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy,
bool OnlyIfReduced) {
+ // Skip cast if types are identical
EthanL
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/17] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/16] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/15] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/15] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/14] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/14] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/13] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/12] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/11] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/11] Add profiling functions to libomptarget
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 01/10] Add profiling functions to libomptarget
@@ -959,8 +959,12 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy
&Builder, const Stmt *S,
unsigned Counter = (*RegionCounterMap)[S];
- llvm::Value *Args[] = {FuncNameVar,
- Builder.getInt64(FunctionHash),
+ // Make sure that pointer to globa
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/9] Add profiling functions to libomptarget
--
@@ -58,6 +60,22 @@ class GlobalTy {
void setPtr(void *P) { Ptr = P; }
};
+typedef void *IntPtrT;
+struct __llvm_profile_data {
+#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
+#include "llvm/ProfileData/InstrProfData.inc"
+};
+
+/// PGO profiling data
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device,
+ DeviceImageTy &Image) {
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device,
+ DeviceImageTy &Image) {
@@ -163,3 +163,87 @@ Error
GenericGlobalHandlerTy::readGlobalFromImage(GenericDeviceTy &Device,
return Plugin::success();
}
+
+bool GenericGlobalHandlerTy::hasProfilingGlobals(GenericDeviceTy &Device,
+ DeviceImageTy &Image) {
@@ -58,6 +60,22 @@ class GlobalTy {
void setPtr(void *P) { Ptr = P; }
};
+typedef void *IntPtrT;
EthanLuisMcDonough wrote:
`IntPtrT` isn't defined in `profile/InstrProfData.inc`. There are multiple
examples of this type being defined. before InstProfData.i
@@ -58,6 +60,22 @@ class GlobalTy {
void setPtr(void *P) { Ptr = P; }
};
+typedef void *IntPtrT;
+struct __llvm_profile_data {
+#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
+#include "llvm/ProfileData/InstrProfData.inc"
+};
+
+/// PGO profiling data
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/8] Add profiling functions to libomptarget
--
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/8] Add profiling functions to libomptarget
--
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/7] Add profiling functions to libomptarget
--
https://github.com/EthanLuisMcDonough updated
https://github.com/llvm/llvm-project/pull/76587
>From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001
From: Ethan Luis McDonough
Date: Fri, 15 Dec 2023 20:38:38 -0600
Subject: [PATCH 1/6] Add profiling functions to libomptarget
--
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName,
return VarName;
}
+bool isGPUProfTarget(const Module &M) {
+ const auto &triple = M.getTargetTriple();
+ return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 ||
+ triple.r
https://github.com/EthanLuisMcDonough created
https://github.com/llvm/llvm-project/pull/76587
This pull request is the first part of an ongoing effort to extends PGO
instrumentation to GPU device code. This PR makes the following changes:
- Adds blank registration functions to device RTL
- Giv
Author: Ethan Luis McDonough
Date: 2023-02-21T16:14:19-06:00
New Revision: ce3a1c59e18027e7d18a2a0a99e4bc81ccc03491
URL:
https://github.com/llvm/llvm-project/commit/ce3a1c59e18027e7d18a2a0a99e4bc81ccc03491
DIFF:
https://github.com/llvm/llvm-project/commit/ce3a1c59e18027e7d18a2a0a99e4bc81ccc0349
63 matches
Mail list logo