[Mlir-commits] [mlir] [mlir][gpu] remove async requirement for conversion to LLVM (PR #88634)
Maksim Levental
llvmlistbot at llvm.org
Sat Apr 13 12:25:30 PDT 2024
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/88634
This check makes sense (as a current analysis limitation) if the op is in fact async but I don't really understand why all of these conversions require async? E.g., if I'm doing everything synchronously, I believe all of runtime APIs calls are still correct/legal?
>From 60037d4168eb392284c5e039cc3209f9e615c62d Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Sat, 13 Apr 2024 14:23:29 -0500
Subject: [PATCH] [mlir][gpu] remove async requirement for conversion to LLVM
---
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp b/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
index 78d4e806246872..c15f97ca51883d 100644
--- a/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
+++ b/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
@@ -757,13 +757,10 @@ static LogicalResult areAllLLVMTypes(Operation *op, ValueRange operands,
static LogicalResult
isAsyncWithOneDependency(ConversionPatternRewriter &rewriter,
gpu::AsyncOpInterface op) {
- if (op.getAsyncDependencies().size() != 1)
+ if (op.getAsyncToken() && op.getAsyncDependencies().size() != 1)
return rewriter.notifyMatchFailure(
op, "Can only convert with exactly one async dependency.");
- if (!op.getAsyncToken())
- return rewriter.notifyMatchFailure(op, "Can convert only async version.");
-
return success();
}
More information about the Mlir-commits
mailing list