Skip to content

Commit

Permalink
[NFC] Minor clean ups found during LLVM upgrade (triton-lang#2433)
Browse files Browse the repository at this point in the history
Pull some of the changes required for LLVM upgrade to make the upgrade
simpler.
  • Loading branch information
ThomasRaoux authored Oct 3, 2023
1 parent cd38642 commit 020f43d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ if(TRITON_BUILD_PYTHON_MODULE)
MLIRLLVMDialect
MLIRSupport
MLIRTargetLLVMIRExport
MLIRExecutionEngine
MLIRMathToLLVM
MLIRNVVMToLLVMIRTranslation
MLIRROCDLToLLVMIRTranslation
Expand Down
1 change: 0 additions & 1 deletion bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ llvm_update_compile_flags(triton-translate)
MLIRPass
MLIRSupport
MLIRTransforms
MLIRExecutionEngine
MLIRMathToLLVM
MLIRTransformUtils
MLIRLLVMToLLVMIRTranslation
Expand Down
6 changes: 4 additions & 2 deletions lib/Conversion/TritonGPUToLLVM/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,15 @@ static Value commonShflSync(Location loc, ConversionPatternRewriter &rewriter,
Type type = val.getType();
if (type != i32_ty) {
val = bitcast(val, int_ty(bits));
val = zext(i32_ty, val);
if (bits < 32)
val = zext(i32_ty, val);
}
Value mask = i32_val(0xFFFFFFFF);
Value result = rewriter.create<NVVM::ShflOp>(loc, i32_ty, mask, val, i, clamp,
mode, UnitAttr());
if (type != i32_ty) {
result = trunc(int_ty(bits), result);
if (bits < 32)
result = trunc(int_ty(bits), result);
result = bitcast(result, type);
}
return result;
Expand Down
1 change: 0 additions & 1 deletion lib/Target/LLVMIR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ add_mlir_translation_library(TritonLLVMIR
PUBLIC
MLIRArithToLLVM
MLIRBuiltinToLLVMIRTranslation
MLIRExecutionEngineUtils
MLIRIndexToLLVM
MLIRIR
MLIRLLVMDialect
Expand Down

0 comments on commit 020f43d

Please sign in to comment.