[Mlir-commits] [mlir] [MLIR][NVVM] Remove irrelevant guards (PR #97345)

Mehdi Amini llvmlistbot at llvm.org
Mon Jul 1 13:43:55 PDT 2024


https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/97345

This code does not seem to involve the NVPTX backend anywhere.

>From d8aa4b39af50600c38db52415e5ffcbcf910b93b Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Mon, 1 Jul 2024 13:34:05 -0700
Subject: [PATCH] [MLIR][NVVM] Remove irrelevant guards

This code does not seem to involve the NVPTX backend anywhere.
---
 mlir/include/mlir/InitAllPasses.h                    | 2 --
 mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/mlir/include/mlir/InitAllPasses.h b/mlir/include/mlir/InitAllPasses.h
index fedd7737f9ea4..1b9c1b193ace6 100644
--- a/mlir/include/mlir/InitAllPasses.h
+++ b/mlir/include/mlir/InitAllPasses.h
@@ -98,9 +98,7 @@ inline void registerAllPasses() {
   bufferization::registerBufferizationPipelines();
   sparse_tensor::registerSparseTensorPipelines();
   tosa::registerTosaToLinalgPipelines();
-#if LLVM_HAS_NVPTX_TARGET
   gpu::registerGPUToNVVMPipeline();
-#endif
 }
 
 } // namespace mlir
diff --git a/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp b/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
index f4573030a4579..fb440756e0c1d 100644
--- a/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
+++ b/mlir/lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp
@@ -38,7 +38,6 @@
 
 using namespace mlir;
 
-#if LLVM_HAS_NVPTX_TARGET
 namespace {
 
 //===----------------------------------------------------------------------===//
@@ -126,5 +125,3 @@ void mlir::gpu::registerGPUToNVVMPipeline() {
       "code.",
       buildLowerToNVVMPassPipeline);
 }
-
-#endif // LLVM_HAS_NVPTX_TARGET



More information about the Mlir-commits mailing list