https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/102972
>From 4e2834e33249f16b2f30574020c60e5bb62fe4b9 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 12 Aug 2024 15:10:03 -0500
Subject: [PATCH] [LinkerWrapper] Always pass `-flto` if the linker supports it
Su
jhuber6 wrote:
Updated to pass `-O2` instead, this was the actual behavior that passed, so
it's mostly not a functional change.
https://github.com/llvm/llvm-project/pull/102972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
jhuber6 wrote:
We really need to turn off clang-format for the tests, ignoring it.
https://github.com/llvm/llvm-project/pull/102972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> > Updated to pass `-O2` instead, this was the actual behavior that passed, so
> > it's mostly not a functional change.
>
> So you just changed the tests not to use -O1? Doesn't this patch then
> represent a regression in what's supported?
>
I wouldn't consider something "supp
@@ -21,7 +21,6 @@
// RUN: env LIBOMPTARGET_JIT_PRE_OPT_IR_MODULE=%t.pre.ll \
// RUN: LIBOMPTARGET_JIT_SKIP_OPT=true \
// RUN: %libomptarget-run-generic
-// TODO:
jhuber6 wrote:
Yeah, can remove it if needed.
https://github.com/ll
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/102972
>From 4e2834e33249f16b2f30574020c60e5bb62fe4b9 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 12 Aug 2024 15:10:03 -0500
Subject: [PATCH 1/2] [LinkerWrapper] Always pass `-flto` if the linker
supports i
jhuber6 wrote:
> Cases that used to compile successfully (even if more optimized than
> expected) will no longer. Sounds like a regression.
It kind of is, but I don't think we should work around backend bugs in the
clang driver.
https://github.com/llvm/llvm-project/pull/102972
___
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/102972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> This caused a nvlink error with clang. This was found by a OpenMP CI
> https://gitlab.e4s.io/uo-public/llvm-openmp-offloading/-/jobs/301520
Probably an LTO flag I forgot to handle correctly, can you compile it with `-v`
to show what it's passing?
https://github.com/llvm/llvm-
@@ -12,6 +12,10 @@
#error "This file is for CUDA compilation only."
#endif
+// The __CLANG_GPU_DISABLE_MATH_WRAPPERS macro provides a way to let standard
+// libcalls reach the link step instead of being eagerly replaced.
+#ifndef __CLANG_GPU_DISABLE_MATH_WRAPPERS
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/104056
Summary:
This caused issues with
https://gitlab.e4s.io/uo-public/llvm-openmp-offloading/-/jobs/301520
because adding `-flto` caused it to pass `-plugin` sometimes, which
isn't supported.
>From c0f14a2c484fc6172
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/104056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/98234
>From 902690cdfd3108babf0059098932c6b72c493a07 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 9 Jul 2024 17:17:39 -0500
Subject: [PATCH] [Clang] Add `__CLANG_GPU_DISABLE_MATH_WRAPPERS` macro for
offloadi
@@ -392,25 +392,52 @@ EXTERN void *omp_target_memset(void *Ptr, int ByteVal,
size_t NumBytes,
DP("filling memory on host via memset");
memset(Ptr, ByteVal, NumBytes); // ignore return value, memset() cannot
fail
} else {
-// TODO: replace the omp_target_memset()
@@ -0,0 +1,53 @@
+//===-- Kenrels/Memory.cpp - Memory related kernel definitions
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -1533,6 +1533,55 @@ Error GenericDeviceTy::printInfo() {
return Plugin::success();
}
+Expected
+GenericDeviceTy::getKernel(llvm::StringRef Name, DeviceImageTy *ImagePtr) {
+
+ GenericKernelTy *&KernelPtr = KernelMap[Name];
+ if (!KernelPtr) {
jhuber6 wr
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/98234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/104460
Summary:
Currently we have some sema checks to make sure users don't apply
kernel-only attributes to non-kernel functions. However, this currently
did not correctly check for bare NVPTX / AMDGPU kernel attributes
@@ -7147,7 +7147,9 @@ void Sema::ProcessDeclAttributeList(
// good to have a way to specify "these attributes must appear as a group",
// for these. Additionally, it would be good to have a way to specify "these
// attribute must never appear as a group" for attributes li
@@ -7147,7 +7147,9 @@ void Sema::ProcessDeclAttributeList(
// good to have a way to specify "these attributes must appear as a group",
// for these. Additionally, it would be good to have a way to specify "these
// attribute must never appear as a group" for attributes li
@@ -7147,7 +7147,9 @@ void Sema::ProcessDeclAttributeList(
// good to have a way to specify "these attributes must appear as a group",
// for these. Additionally, it would be good to have a way to specify "these
// attribute must never appear as a group" for attributes li
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/104460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7163,7 +7165,8 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
+} else if (!D->hasAttr() &&
--
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/104460
>From 84c89feaea8135f7dfaba488b442818974b51c9d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 15 Aug 2024 10:34:17 -0500
Subject: [PATCH 1/2] [Clang] Fix sema checks thinking kernels aren't kernels
Summ
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/104460
>From 84c89feaea8135f7dfaba488b442818974b51c9d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 15 Aug 2024 10:34:17 -0500
Subject: [PATCH 1/2] [Clang] Fix sema checks thinking kernels aren't kernels
Summ
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/104460
>From 84c89feaea8135f7dfaba488b442818974b51c9d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 15 Aug 2024 10:34:17 -0500
Subject: [PATCH 1/3] [Clang] Fix sema checks thinking kernels aren't kernels
Summ
@@ -7163,24 +7163,27 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
- if (const auto *A = D->getAttr()) {
-
@@ -7163,24 +7163,27 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
- if (const auto *A = D->getAttr()) {
-
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/104460
>From 84c89feaea8135f7dfaba488b442818974b51c9d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 15 Aug 2024 10:34:17 -0500
Subject: [PATCH 1/3] [Clang] Fix sema checks thinking kernels aren't kernels
Summ
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/104460
>From 84c89feaea8135f7dfaba488b442818974b51c9d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 15 Aug 2024 10:34:17 -0500
Subject: [PATCH 1/3] [Clang] Fix sema checks thinking kernels aren't kernels
Summ
@@ -7163,24 +7163,27 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
- if (const auto *A = D->getAttr()) {
-
@@ -393,22 +393,17 @@ struct CUDADeviceTy : public GenericDeviceTy {
return Plugin::success();
}
- virtual Error callGlobalConstructors(GenericPluginTy &Plugin,
- DeviceImageTy &Image) override {
-// Check for the presense of gl
@@ -7163,24 +7163,27 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
- if (const auto *A = D->getAttr()) {
-
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/102913
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
I applied this locally and it resolved
https://github.com/llvm/llvm-project/issues/64863 so I'm looking forward to
this landing.
https://github.com/llvm/llvm-project/pull/102913
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/87695
Summary:
This new attribute was introduced recently. We already do this for NVPTX
kernels so we should apply this for AMDGPU as well. This patch simply
applies this metadata in cases where a lower bound is known
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/87695
>From a314dadecad6f12db20c34a133ec7bb084a77b5d Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 4 Apr 2024 15:10:55 -0500
Subject: [PATCH 1/2] [OpenMP] Add amdgpu-num-work-groups attribute to OpenMP
kernel
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/87695
>From 1738c7f54bc838eac29402c4248db063d908d575 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 4 Apr 2024 15:10:55 -0500
Subject: [PATCH] [OpenMP] Add amdgpu-num-work-groups attribute to OpenMP
kernels
S
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/87695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/87659
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88007
>From 0dbfd89b69197df8201b772b88654810e689cced Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Apr 2024 10:01:06 -0500
Subject: [PATCH] [Libomp] Place generated OpenMP headers into build resource
direct
@@ -10,12 +10,19 @@
include(ExtendPath)
+# The generated headers will be placed in clang's resource directory if
present.
+if(${OPENMP_STANDALONE_BUILD})
+ set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR})
+else()
+ set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOM
jhuber6 wrote:
> IIRC there is a case where `omp.h` as well as other headers are installed
> into clang's directory.
These are currently installed into clang's directory, this patch just puts it
in the resource directory for the build.
https://github.com/llvm/llvm-project/pull/88007
_
@@ -16,4 +16,12 @@ typedef unsigned __INTPTR_TYPE__ uintptr_t;
#error Every target should have __INTPTR_TYPE__
#endif
+#ifdef __INTPTR_MAX__
+#define INTPTR_MAX__INTPTR_MAX__
+#endif
+
+#ifdef __UINTPTR_MAX__
+#define UINTPTR_MAX __UINTPTR_MAX__
+#endif
+
--
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/88007
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16,4 +16,12 @@ typedef unsigned __INTPTR_TYPE__ uintptr_t;
#error Every target should have __INTPTR_TYPE__
#endif
+#ifdef __INTPTR_MAX__
+#define INTPTR_MAX__INTPTR_MAX__
+#endif
+
+#ifdef __UINTPTR_MAX__
+#define UINTPTR_MAX __UINTPTR_MAX__
+#endif
+
--
@@ -10,12 +10,19 @@
include(ExtendPath)
+# The generated headers will be placed in clang's resource directory if
present.
+if(${OPENMP_STANDALONE_BUILD})
+ set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR})
+else()
+ set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOM
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/88007
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/88071
Summary:
These entires are generic for offloading with the new driver now. Having
the `omp` prefix was a historical artifact and is confusing when used
for CUDA. This patch just renames them for now, future patche
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88071
>From e236a4351c198f261e544970d4355f749db11fd7 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Apr 2024 19:10:37 -0500
Subject: [PATCH] [Offload][NFC] Remove `omp_` prefix from offloading entries
Summar
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88071
>From 24c3253093491d0fbe297bc10cba8552b7bef665 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Apr 2024 19:10:37 -0500
Subject: [PATCH] [Offload][NFC] Remove `omp_` prefix from offloading entries
Summar
jhuber6 wrote:
> How about `llvm.offload`? This might need broader discussion but I'm fine
> either way.
I don't think it's too important here since these are effectively internal
variables. However in the future I want to combine `cuda_offload_entires` and
friends into just `llvm_offload_ent
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88071
>From 198e77ad14ff83d2ed9ea80a1dcecafa1b1336a0 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Apr 2024 19:10:37 -0500
Subject: [PATCH] [Offload][NFC] Remove `omp_` prefix from offloading entries
Summar
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88071
>From c94d444b4317706c7434853c0c3490826bdbc110 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 8 Apr 2024 19:10:37 -0500
Subject: [PATCH] [Offload][NFC] Remove `omp_` prefix from offloading entries
Summar
jhuber6 wrote:
> Hey, @jhuber. This change broke the flang build.
>
> When I revert the change, everything builds cleanly. So I reverted it in
> merge request #88083.
>
> After this change was added, I started getting messages like:
>
> ```
> [4/205] Building CXX object
> projects/openmp/lib
jhuber6 wrote:
> Hey, @jhuber. This change broke the flang build.
>
> When I revert the change, everything builds cleanly. So I reverted it in
> merge request #88083.
>
> After this change was added, I started getting messages like:
>
> ```
> [4/205] Building CXX object
> projects/openmp/lib
jhuber6 wrote:
> So the error is caused by your `c++` not supporting `__has_feature`
> presumably. However I have no clue why that would happen due to this patch. I
> believe in a few days @jdoerfert will flip the switch and we won't even allow
> `libomptarget` to be built without using the ru
jhuber6 wrote:
> I should have mentioned, I'm building with GCC 9.3.0. Most of my team uses
> this compiler.
Yeah, that's fine for building LLVM but in the future we'll probably require
building the offloading runtime with an up-to-date clang. I think for now I can
just restrict this patch to
Author: Joseph Huber
Date: 2024-04-09T08:47:51-05:00
New Revision: d022f6b8ff94bb13d12d39f23a3c3e7836e90756
URL:
https://github.com/llvm/llvm-project/commit/d022f6b8ff94bb13d12d39f23a3c3e7836e90756
DIFF:
https://github.com/llvm/llvm-project/commit/d022f6b8ff94bb13d12d39f23a3c3e7836e90756.diff
jhuber6 wrote:
ping
https://github.com/llvm/llvm-project/pull/87532
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> if a.o depends on b.o in libb.a, and b.o depends on c.o in libb.a, will the
> linker wrapper be able to link all the dependencies?
Given an invocation like this with those dependencies
```console
$ clang main.o libb.a liba.a
```
main.o will extract `a.o` from `liba.a`. We will
@@ -201,3 +201,24 @@
! RUN: -nogpulibc %s 2>&1 \
! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s
! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu"
+
+! RUN: rm -rf %t/Inputs
+
+! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \
+! RUN: --off
@@ -1340,7 +1340,8 @@ def hip_link : Flag<["--"], "hip-link">,
Group,
HelpText<"Link clang-offload-bundler bundles for HIP">;
def no_hip_rt: Flag<["-"], "no-hip-rt">, Group,
HelpText<"Do not link against HIP runtime libraries">;
-def rocm_path_EQ : Joined<["--"], "rocm-pat
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
StringRef Val = A->getValue();
CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val));
}
+
+ // Check ROCm path if specified
+ const ToolChain &TC = getToolChain();
+ TC.getDev
@@ -201,3 +201,24 @@
! RUN: -nogpulibc %s 2>&1 \
! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s
! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu"
+
+! RUN: rm -rf %t/Inputs
+
+! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \
+! RUN: --off
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/88071
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1340,7 +1340,8 @@ def hip_link : Flag<["--"], "hip-link">,
Group,
HelpText<"Link clang-offload-bundler bundles for HIP">;
def no_hip_rt: Flag<["-"], "no-hip-rt">, Group,
HelpText<"Do not link against HIP runtime libraries">;
-def rocm_path_EQ : Joined<["--"], "rocm-pat
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
StringRef Val = A->getValue();
CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val));
}
+
+ // Check ROCm path if specified
+ const ToolChain &TC = getToolChain();
+ TC.getDev
@@ -201,3 +201,24 @@
! RUN: -nogpulibc %s 2>&1 \
! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s
! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu"
+
+! RUN: rm -rf %t/Inputs
+
+! RUN: not %flang -### -v --target=x86_64-unknown-linux-gnu -fopenmp \
+! RUN: --off
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/87532
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 commented:
Seems somewhat superfluous to me. I'm wondering if what this customer wants to
do is more easily serviced by `#if __has_builtin(...)` or `#if
__has_feature(...)`. However I definitely agree that our feature detection
macros are a bit of a mess. I'm not pri
https://github.com/jhuber6 commented:
`clang` already tests this pretty well, but I'd still like to have at least one
check to make sure that `flang` is actually putting `-rpath` in the linker.
https://github.com/llvm/llvm-project/pull/88280
___
cfe-c
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/88280
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -345,7 +345,13 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
// Check ROCm path if specified
const ToolChain &TC = getToolChain();
- TC.getDeviceLibs(Args);
+ std::string HIPVersion;
+ llvm::raw_string_ostream HIPInfo(HIPVersion);
+ TC.printVerboseInfo(HIP
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/88398
Summary:
Currently we treat this attribute as a minimum number for the amount of
blocks scheduled on the kernel. However, the doucmentation states that
this applies to CTA's mapped onto a *single* SM. Currently we
@@ -345,7 +345,13 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
// Check ROCm path if specified
const ToolChain &TC = getToolChain();
- TC.getDeviceLibs(Args);
+ std::string HIPVersion;
+ llvm::raw_string_ostream HIPInfo(HIPVersion);
+ TC.printVerboseInfo(HIP
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/88402
Summary:
This patch prevents the `-fcf-protection=` flag from being passed to the
device compilation during offloading. This is not supported on CUDA and
AMD devices, but if the user is compiling with fcf protecti
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/88402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/88402
>From 9b9cbaa09425a706eaf3bb8e85a824ef89b61a9f Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 11 Apr 2024 10:36:15 -0500
Subject: [PATCH] [Offload] Do not pass `-fcf-protection=` for offloading
Summary:
@@ -345,7 +345,13 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
// Check ROCm path if specified
const ToolChain &TC = getToolChain();
- TC.getDeviceLibs(Args);
+ std::string HIPVersion;
+ llvm::raw_string_ostream HIPInfo(HIPVersion);
+ TC.printVerboseInfo(HIP
@@ -6867,8 +6867,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
CmdArgs.push_back("-nogpulib");
if (Arg *A = Args.getLastArg(options::OPT_fcf_protection_EQ)) {
-CmdArgs.push_back(
-Args.MakeArgString(Twine("-fcf-protection=") + A->getVal
@@ -0,0 +1,39 @@
+// Check that -fcf-protection does not get passed to the device-side
+// compilation.
+
+// RUN: %clang -### -x cuda --target=x86_64-unknown-linux-gnu -nogpulib \
+// RUN: -nogpuinc --offload-arch=sm_52 -fcf-protection=full -c %s 2>&1 \
+// RUN: | FileCheck %s
@@ -201,3 +201,16 @@
! RUN: -nogpulibc %s 2>&1 \
! RUN: | FileCheck --check-prefix=NO-LIBC-GPU-AMDGPU %s
! NO-LIBC-GPU-AMDGPU-NOT: "-lcgpu-amdgpu"
+
+! RUN: rm -rf %t/Inputs
+! RUN: mkdir -p %t/Inputs
+! RUN: cp -r %S/../../../clang/test/Driver/Inputs/rocm %t/Input
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/88190
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
I'm wondering if it would be better to make this something that the toolchains
handle in `TranslateArgs`. That way we can prevent it from being added at all.
Although I don't know how that would allow us to override stuff. There's not
really a way to "override" flags like this i
jhuber6 wrote:
I definitely like moving things out of Sema, since it's so big it always brings
my LSP to its knees. Have you run the CUDA / HIP tests in the external test
suite or anything?
https://github.com/llvm/llvm-project/pull/88559
___
cfe-comm
jhuber6 wrote:
> > Have you run the CUDA / HIP tests in the external test suite or anything?
>
> No, just `check-clang` target. You think it's necessary to run something else
> before merging? If so, you should point me out to what to run, and preferably
> give some instructions, as CUDA devel
jhuber6 wrote:
Went ahead and applied this locally. Runs some trivial CUDA / HIP programs so
I'd say it's fine. I'll wait until @Artem-B or @yxsamliu chime in however as
they're the main contributors to this part.
https://github.com/llvm/llvm-project/pull/88559
@@ -50,6 +50,11 @@ const char *CudaVersionToString(CudaVersion V);
// Input is "Major.Minor"
CudaVersion CudaStringToVersion(const llvm::Twine &S);
+// We have a name conflict with sys/mac.h on AIX
+#ifdef _AIX
+#undef SM_32
+#endif
+
jhuber6 wrote:
```sugges
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/88644
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
I can't really think of anything more clever here unfortunately and we should
probably unbreak the bot. Maybe someone more familiar with PowerPC knows if
it's possible to simply not include this header somewhere.
https://github.com/llvm/llvm-project/pull/88644
__
jhuber6 wrote:
> An offline suggestion from Pierre is that this should early-exit if there are
> no variadic functions in the module. That's a good thing, I'd like to
> consider it another of the increase-complexity-for-decreased-compile-time to
> implement after something has landed.
I thoug
https://github.com/jhuber6 commented:
Overall I think this is good. Address the existing comments and I think we
should be able to land it. Potentially we should be able to check for the
existence of `va_start` in the module to early-exit like you said, which will
keep functional changes to a
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/93362
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8,10 +8,15 @@ add_custom_target(libc-long-running-tests)
add_subdirectory(UnitTest)
-if(LIBC_TARGET_OS_IS_GPU AND
jhuber6 wrote:
Can we precommit or move this to a separate patch
https://github.com/llvm/llvm-project/pull/93362
__
jhuber6 wrote:
> Early exit on lack of va_start will be incorrect in the lowering case, which
> is the only one enabled by default. I believe existing comments are all
> addressed.
Figured if there's no `va_start` there's nothing for the pass to do anyway.
> Precommit the cmake diagnostic twe
@@ -8,10 +8,15 @@ add_custom_target(libc-long-running-tests)
add_subdirectory(UnitTest)
-if(LIBC_TARGET_OS_IS_GPU AND
jhuber6 wrote:
Done
https://github.com/llvm/llvm-project/pull/93362
___
cfe-commits mailing lis
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/94751
Summary:
The utilities `nvptx-arch` and `amdgpu-arch` are used to support
`--offload-arch=native` among other utilities in clang. However, these
rely on the GPU drivers to query the features. In certain cases thes
jhuber6 wrote:
No active test because I have no clue how you would, but I intentionally made
it time out and it returns a 'Child timed out` error as expected.
https://github.com/llvm/llvm-project/pull/94751
___
cfe-commits mailing list
cfe-commits@lis
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/94751
>From 0e367c72a1cc163fd781f98b9fac809d90f4beb7 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 7 Jun 2024 08:15:06 -0500
Subject: [PATCH] [Clang] Add timeout for GPU detection utilities
Summary:
The utili
1101 - 1200 of 3044 matches
Mail list logo