yxsamliu wrote:
> > In practice this should be a single use of an internal function and should
> > not require this hint. Is this papering over a different issue?
>
> Why do you think it is an internal function? I thought it's an externally
> callable stub.
Agree. OpenCL allows calling an ext
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"],
"offload-compression-level=">,
Flags<[HelpHidden]>,
HelpText<"Compression level for offload device binaries (HIP only)">;
+def offload_jobs_EQ : Joined<["--"], "offload-jobs=">,
+ HelpText<"Set the
@@ -9360,6 +9362,19 @@ void LinkerWrapper::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back(LinkArg);
addOffloadCompressArgs(Args, CmdArgs);
+
+ // Default to half of hardware threads if users do not specify it.
+ if (Arg *A = Args.getLastArg(opti
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/135229
>From 8d66eac07fa9b4d052b821f1f33783a3e5a1af34 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 10 Apr 2025 14:14:47 -0400
Subject: [PATCH] [Clang] add option --offload-jobs=N
for specifying number
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"],
"offload-compression-level=">,
Flags<[HelpHidden]>,
HelpText<"Compression level for offload device binaries (HIP only)">;
+def offload_jobs_EQ : Joined<["--"], "offload-jobs=">,
+ HelpText<"Set the
@@ -1234,6 +1234,10 @@ def offload_compression_level_EQ : Joined<["--"],
"offload-compression-level=">,
Flags<[HelpHidden]>,
HelpText<"Compression level for offload device binaries (HIP only)">;
+def offload_jobs_EQ : Joined<["--"], "offload-jobs=">,
+ HelpText<"Specify
yxsamliu wrote:
> This patch is cruelly missing some tests. Is there a place for tests of this
> kind? I haven't found an obvious one for other headers.
You may consider adding a test here
https://github.com/llvm/llvm-test-suite/tree/main/External/HIP.
If possible, I would be happy to see std
yxsamliu wrote:
LGTM. The addition of the device version of std::__glibcxx_assert_fail() seems
reasonable and straightforward.
WDYT @Artem-B
https://github.com/llvm/llvm-project/pull/136133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/138555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/138162
>From 7b139b3a06e45f7429e1e0f15eb16d0c3aed5718 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 1 May 2025 12:08:05 -0400
Subject: [PATCH] [CUDA][HIP] Fix implicit attribute of builtin
When a builti
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/138162
When a builtin function with generic pointer parameter is passed a pointer with
address space, clang creates an overloaded builtin function but does not make
it implicit. This causes error when the builtin is
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/138162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -57,6 +57,7 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
+#include "llvm/Support/ThreadPool.h"
yxsamliu wrote:
will remove
https://github.com/llvm/llvm-project/pull/135229
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/135229
>From 5c2283b01ac6a58e41df4260aecc01bcf463a0a9 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 10 Apr 2025 14:14:47 -0400
Subject: [PATCH] [Clang] add option --offload-jobs=N
for specifying number
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/135229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,23 @@
+// expected-no-diagnostics
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -aux-triple
amdgcn-amd-amdhsa -fsyntax-only -verify -xhip %s
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsyntax-only -fcuda-is-device
-verify -xhip %s
+
+#include "Inputs/cuda
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/138162
Rate limit ยท GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/138162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/138162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/138162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/138162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -32,22 +32,24 @@ public:
template class B;
}
-// The implicit host/device attrs of virtual dtor B::~B() is inferred to
-// have implicit device attr since dtors of its members and parent classes can
-// be executed on device. This causes a diagnostic since B::~B() must
-//
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *);
typedef hipError_t (*hipDeviceGet_t)(int *, int);
typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int);
-int printGPUsByHIP() {
+extern cl::opt Verbose;
+
#ifdef _WIN32
- constexpr const
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/111885
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/101350
>From aba3005a829cecdeb13c1bc4118cbc5ad959affe Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Wed, 31 Jul 2024 09:23:05 -0400
Subject: [PATCH] Fix amdgpu-arch for dll name on Windows
Recently HIP runti
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *);
typedef hipError_t (*hipDeviceGet_t)(int *, int);
typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int);
-int printGPUsByHIP() {
+extern cl::opt Verbose;
+
#ifdef _WIN32
- constexpr const
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/101350
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
[AMD Official Use Only - AMD Internal Distribution Only]
I will revert it.
Sam
From: Vladimir Vereschaka ***@***.***>
Sent: Friday, March 7, 2025 3:34 PM
To: llvm/llvm-project ***@***.***>
Cc: Liu, Yaxun (Sam) ***@***.***>; Mention ***@***.***>
Subject: Re: [llvm/llvm-project]
Author: Yaxun (Sam) Liu
Date: 2025-03-07T15:54:50-05:00
New Revision: 5ff43550fa2aa3b93aa7310b8e435ba9e1338486
URL:
https://github.com/llvm/llvm-project/commit/5ff43550fa2aa3b93aa7310b8e435ba9e1338486
DIFF:
https://github.com/llvm/llvm-project/commit/5ff43550fa2aa3b93aa7310b8e435ba9e1338486.dif
yxsamliu wrote:
I have some doubt whether this will work for CUDA/HIP since their AST is not
aware of address space. When translated to IR, any pointer is expected to
pointing to default addr space. That is why alloca is immediately casted to
generic pointer and used as generic pointer to matc
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/130011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/79026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
close this for now since it seems no longer needed
https://github.com/llvm/llvm-project/pull/79026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/75357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
close this since it is superseded by other PRs
https://github.com/llvm/llvm-project/pull/75357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/130624
Reload aba3005a after fixing build failure.
Recently HIP runtime changed dll name to amdhip64_n.dll on Windows, where n is
ROCm major version number.
Fix amdgpu-arch to search for amdhip64_n.dll on Windows.
yxsamliu wrote:
> Would it make sense to separate into separate patches deferred diag fix
> (1a/1b on your list) from inference of destructor attributes?
>
> Deferred diags fix is straightforward, but destructor attribute inference may
> need a longer discussion.
split the deferred diag chang
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/129117
Currently the deferred diag fails to diagnose calling of host function in host
device function in device compilation triggered by destructors.
This can be further divided into two issuse:
1. the deferred diag
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/129117
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/128926
>From 30bde986afda876d877d63212d8e4a34d2927aad Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Wed, 26 Feb 2025 11:43:28 -0500
Subject: [PATCH] [CUDA][HIP] fix virtual dtor host/device attr
Currently if
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/128926
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/129117
>From 6089ec549a2456b6edf716cecf8f77d1ad0923b0 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Wed, 26 Feb 2025 11:43:28 -0500
Subject: [PATCH] [CUDA][HIP] check dtor in deferred diag
Currently the defe
@@ -1798,6 +1798,62 @@ class DeferredDiagnosticsEmitter
Inherited::visitUsedDecl(Loc, D);
}
+ // Visitor member and parent dtors called by this dtor.
+ void VisitCalledDestructors(CXXDestructorDecl *DD) {
+const CXXRecordDecl *RD = DD->getParent();
+
+// Visi
@@ -32,22 +32,24 @@ public:
template class B;
}
-// The implicit host/device attrs of virtual dtor B::~B() is inferred to
-// have implicit device attr since dtors of its members and parent classes can
-// be executed on device. This causes a diagnostic since B::~B() must
-//
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -132,6 +132,12 @@ Attribute Changes in Clang
This forces the global to be considered small or large in regards to the
x86-64 code model, regardless of the code model specified for the
compilation.
+- Introduced a new statement attribute ``[[clang::atomic]]`` that enabl
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
> Would it make sense to separate into separate patches deferred diag fix
> (1a/1b on your list) from inference of destructor attributes?
>
> Deferred diags fix is straightforward, but destructor attribute inference may
> need a longer discussion.
will separate the deferred di
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/130624
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
LGTM for HIP
https://github.com/llvm/llvm-project/pull/105746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1121,13 +1122,116 @@
CompressedOffloadBundle::compress(llvm::compression::Params P,
llvm::StringRef(FinalBuffer.data(), FinalBuffer.size()));
}
+// Use packed structs to avoid padding, such that the structs map the
serialized
+// format.
+LLVM_PACKED_START
+union R
@@ -1,13 +1,15 @@
// Check CUID generated by hash.
// The same CUID is generated for the same file with the same options.
+// RUN: cd %S
+
// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu
--no-offload-new-driver \
// RUN: --offload-arch=gfx906 -c -nogpuinc -no
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/111885
>From 2b90f311fef72514783d2d0840f76493c36a5d39 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Wed, 25 Sep 2024 14:31:54 -0400
Subject: [PATCH] Reland "[HIP] Use original file path for CUID" (#108771)
T
yxsamliu wrote:
ping
https://github.com/llvm/llvm-project/pull/114841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/124989
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/124983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -350,13 +353,105 @@ void
DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
- if (EC) {
-Diags.Report(diag::err_fe_error_opening) << OutputFile
@@ -350,13 +353,105 @@ void
DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
- if (EC) {
-Diags.Report(diag::err_fe_error_opening) << OutputFile
@@ -350,13 +353,105 @@ void
DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
- if (EC) {
-Diags.Report(diag::err_fe_error_opening) << OutputFile
@@ -350,13 +353,105 @@ void
DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
- if (EC) {
-Diags.Report(diag::err_fe_error_opening) << OutputFile
@@ -1056,8 +1056,20 @@ void Clang::AddPreprocessingOptions(Compilation &C,
const JobAction &JA,
DepFile = getDependencyFileName(Args, Inputs);
C.addFailureResultFile(DepFile, &JA);
}
- CmdArgs.push_back("-dependency-file");
- CmdArgs.push_back(D
@@ -313,6 +313,8 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus)
FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus &&
LangOpts.RelativeCXXABIVTables)
+FEATURE(atomic_attributes, true)
yxsamliu wrote:
will change
https://github.com/llvm/llvm-project/pull/114
@@ -5400,6 +5400,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -4979,3 +4979,16 @@ def NoTrivialAutoVarInit: InheritableAttr {
let Documentation = [NoTrivialAutoVarInitDocs];
let SimpleHandler = 1;
}
+
+def Atomic : StmtAttr {
+ let Spellings = [Clang<"atomic">];
+ let Args = [VariadicStringArgument<"Options">];
y
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -3101,6 +3101,11 @@ class Parser : public CodeCompletionHandler {
std::optional ParseAvailabilitySpec();
ExprResult ParseAvailabilityCheckExpr(SourceLocation StartLoc);
+ void ParseAtomicAttribute(IdentifierInfo &AttrName,
yxsamliu wrote:
will use Var
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal
@@ -798,6 +798,8 @@ def MD : Flag<["-"], "MD">, Group,
HelpText<"Write a depfile containing user and system headers">;
def MMD : Flag<["-"], "MMD">, Group,
HelpText<"Write a depfile containing user headers">;
+def MMMD : Flag<["-"], "MMMD">, Group,
yxsa
yxsamliu wrote:
what if some HIP apps use them? Should we add deprecated attribute to them then
remove them in the next release?
https://github.com/llvm/llvm-project/pull/128022
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -1056,8 +1056,20 @@ void Clang::AddPreprocessingOptions(Compilation &C,
const JobAction &JA,
DepFile = getDependencyFileName(Args, Inputs);
C.addFailureResultFile(DepFile, &JA);
}
- CmdArgs.push_back("-dependency-file");
- CmdArgs.push_back(D
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/128926
Currently if CUDA/HIP users use template class with virtual dtor and
std::string data member with C++20 and MSVC. When the template class is
explicitly instantiated, they encounter unresolved symbols in linker
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St,
const ParsedAttr &A,
return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A);
}
+static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A,
+ Source
@@ -1107,6 +1113,66 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+// The three atomic code-generation options.
+// The canonical (positive) names are:
+// "remote_memory", "fine_grained_memory", and "ignore_denormal_
@@ -3286,6 +3286,8 @@ def err_invalid_branch_protection_spec : Error<
"invalid or misplaced branch protection specification '%0'">;
def warn_unsupported_branch_protection_spec : Warning<
"unsupported branch protection specification '%0'">,
InGroup;
+def err_attribute_inval
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/133590
>From 3f533ad3a54b199e96a14e91f01b9714c30f52c2 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Sun, 25 Feb 2024 11:13:40 -0500
Subject: [PATCH] [HIP] fix host min/max in header
CUDA defines min/max func
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/133456
Cmake automatically generates dependency files with all compilation options
provided by users. When users use `--offload-compress` for HIP compilation, it
causes warnings when cmake generates dependency files.
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/133456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/131546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/133590
CUDA defines min/max functions for host in global namespace. HIP header needs
to define them too to be compatible. Currently only min/max(int, int) is
defined. This causes wrong result for arguments that are o
yxsamliu wrote:
This is an effort to reland https://github.com/llvm/llvm-project/pull/82956
Since we kept encountering regressions, we plan to add the change conditionally
under a macro so that we can deliver the fix to intended users without causing
regressions. Then we will try making the ch
@@ -1026,6 +1026,12 @@ void Clang::AddPreprocessingOptions(Compilation &C,
const JobAction &JA,
CmdArgs.push_back("-dependency-file");
CmdArgs.push_back(DepFile);
}
+// Cmake generates dependency files using all compilation options specified
+// by user
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/132869
>From 205999ed91d9ed65dcfb73377f853ae7e35a7bda Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Fri, 21 Mar 2025 14:16:44 -0400
Subject: [PATCH] [HIP] use offload wrapper for non-device-only non-rdc
Curr
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/133456
>From be4ea80f2431bff0c017df3aef9f260dddfa9ccc Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Fri, 28 Mar 2025 11:30:39 -0400
Subject: [PATCH] [HIP] Claim --offloading-compress for -M
Cmake automatical
@@ -0,0 +1,64 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --check-globals all --version 5
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx900 -emit-llvm %s
-o - | FileCheck --check-prefix=AMDGCN-GFX900 %s
+// RUN: %cla
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/133456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/115821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address
spaces are fenced.
__builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local")
__builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global")
+__builtin_amdgcn_processor_is and __bui
@@ -2312,6 +2312,17 @@ bool Type::isRealType() const {
return isBitIntType();
}
+bool Type::isFPAtomicCompatibleType() const {
yxsamliu wrote:
LGTM. It does not depend on other factors.
https://github.com/llvm/llvm-project/pull/129495
_
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned
BuiltinID,
llvm::Value *Env = EmitScalarExpr(E->getArg(0));
return Builder.CreateCall(F, {Env});
}
+ case AMDGPU::BI__builtin_amdgcn_processor_is: {
+assert(CGM.getTriple().isSPIRV() &&
@@ -242,3 +242,9 @@
// NO-WARN-ATOMIC: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}}
"-Werror=atomic-alignment" {{.*}} "-Wno-error=atomic-alignment"
// NO-WARN-ATOMIC-NOT: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}}
"-Werror=atomic-alignment"
// NO-WARN-ATOMIC-
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/139112
Currently ROCm 6.4.0 only recognize spirv64-amd-amdhsa- in bundle ID.
spirv64-amd-amdhsa-unknown causes all HIP apps compiled for amdgcnspirv to fail.
Previously we fixed a similar issue for
amdgcn-amd-amdhsa-
yxsamliu wrote:
I don't think this PR should be merged. Since John is the code owner of clang
codegen.
https://github.com/llvm/llvm-project/pull/138866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
1501 - 1600 of 1680 matches
Mail list logo