[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-15 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg closed https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-15 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg updated https://github.com/llvm/llvm-project/pull/78057 >From f56a7395b19ff634b3ac963204348db2575fdf87 Mon Sep 17 00:00:00 2001 From: Fabian Mora Date: Sat, 13 Jan 2024 17:31:51 + Subject: [PATCH 1/4] Move OffloadWrapper.* to llvm/Frontend/Offloading --- .../i

[clang] [llvm] [mlir] [mlir][gpu] Add the `OffloadEmbeddingAttr` offloading translation attr (PR #78117)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/78117 This patch adds the offloading translation attribute. This attribute uses LLVM offloading infrastructure to embed GPU binaries in the IR. At the program start, the LLVM offloading mechanism registers kernels and

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg edited https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg updated https://github.com/llvm/llvm-project/pull/78057 >From f56a7395b19ff634b3ac963204348db2575fdf87 Mon Sep 17 00:00:00 2001 From: Fabian Mora Date: Sat, 13 Jan 2024 17:31:51 + Subject: [PATCH 1/3] Move OffloadWrapper.* to llvm/Frontend/Offloading --- .../i

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg ready_for_review https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg updated https://github.com/llvm/llvm-project/pull/78057 >From f56a7395b19ff634b3ac963204348db2575fdf87 Mon Sep 17 00:00:00 2001 From: Fabian Mora Date: Sat, 13 Jan 2024 17:31:51 + Subject: [PATCH 1/2] Move OffloadWrapper.* to llvm/Frontend/Offloading --- .../i

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/78057 This patch moves `clang/tools/clang-linker-wrapper/OffloadWrapper.*` to `llvm/Frontend/Offloading` allowing them to be reutilized by other projects. Additionally, it makes minor modifications to the API to make

[libcxx] [mlir] [clang-tools-extra] [lld] [libc] [openmp] [flang] [compiler-rt] [llvm] [clang] [lldb] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-06 Thread Fabian Mora via cfe-commits
@@ -0,0 +1,31 @@ +//===- SPIRVToLLVMIRTranslation.cpp - Translate SPIRV to LLVM IR --===// +// +// 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

[clang] [libc] [compiler-rt] [libcxx] [lld] [mlir] [clang-tools-extra] [llvm] [flang] [openmp] [lldb] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg closed https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [lldb] [clang] [compiler-rt] [lld] [mlir] [libc] [clang-tools-extra] [openmp] [llvm] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg approved this pull request. LGTM! I'll squash and merge as soon it passes all pre check tests. https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[compiler-rt] [lld] [libcxx] [clang-tools-extra] [clang] [llvm] [libc] [lldb] [mlir] [flang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-20 Thread Fabian Mora via cfe-commits
@@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ®istry) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry); fa

[flang] [mlir] [clang-tools-extra] [lld] [compiler-rt] [lldb] [llvm] [libc] [libcxx] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-17 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg edited https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang-tools-extra] [mlir] [lldb] [libcxx] [llvm] [compiler-rt] [flang] [clang] [lld] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-17 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg edited https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [mlir] [llvm] [clang-tools-extra] [flang] [compiler-rt] [libc] [libcxx] [lldb] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-17 Thread Fabian Mora via cfe-commits
@@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ®istry) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry); fa

[llvm] [clang] [mlir] [clang-tools-extra] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-13 Thread Fabian Mora via cfe-commits
@@ -4,6 +4,7 @@ module attributes {gpu.container_module} { // CHECK: [[ARGS_TY:%.*]] = type { i32, i32 } // CHECK: @kernel_module_bin_cst = internal constant [4 x i8] c"BLOB", align 8 + // CHECK: @kernel_module_bin_size_cst = internal constant i64 4, align 8

[clang] [llvm] [clang-tools-extra] [mlir] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-13 Thread Fabian Mora via cfe-commits
@@ -377,10 +379,17 @@ llvm::LaunchKernel::createKernelLaunch(mlir::gpu::LaunchFuncOp op, if (!binary) return op.emitError() << "Couldn't find the binary: " << binaryIdentifier; + auto binaryVar = dyn_cast(binary); + llvm::Constant *binaryInit = binaryVar->getInitializ

[clang-tools-extra] [libc] [libcxx] [compiler-rt] [flang] [mlir] [clang] [llvm] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Fabian Mora via cfe-commits
@@ -15,6 +15,7 @@ #include "Utils.h" #include "mlir/Dialect/GPU/IR/GPUDialect.h" +#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h" fabianmcg wrote: Back when the compilation redesign was happening we decided to add the attach* passes in GPU to avoid pollut

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-26 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg approved this pull request. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [MLIR] Enabling Intel GPU Integration. (PR #65539)

2023-09-07 Thread Fabian Mora via cfe-commits
@@ -0,0 +1,70 @@ +//===- SerializeToSPIRV.cpp - Convert GPU kernel to SPIRV blob -===// +// +// 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: Ap

[clang] [MLIR] Enabling Intel GPU Integration. (PR #65539)

2023-09-07 Thread Fabian Mora via cfe-commits
@@ -0,0 +1,70 @@ +//===- SerializeToSPIRV.cpp - Convert GPU kernel to SPIRV blob -===// +// +// 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: Ap