[Mlir-commits] [mlir] [mlir][amdgpu] Add tensor load store operations (PR #172686)
Ivan Butygin
llvmlistbot at llvm.org
Wed Dec 17 08:20:18 PST 2025
================
@@ -3306,6 +3327,30 @@ void mlir::populateAMDGPUTypeAndAttributeConversions(
Type i32 = IntegerType::get(type.getContext(), 32);
return typeConverter.convertType(VectorType::get(4, i32));
});
+ typeConverter.addConversion(
+ [&](TDMDescriptorType type,
+ SmallVectorImpl<Type> &result) -> std::optional<LogicalResult> {
+ Type i32 = IntegerType::get(type.getContext(), 32);
+ Type v4i32 = typeConverter.convertType(VectorType::get(4, i32));
+ Type v8i32 = typeConverter.convertType(VectorType::get(8, i32));
+ llvm::append_values(result, v4i32, v8i32, v4i32, v4i32);
+ return success();
+ });
+
+ auto addUnrealizedCast = [](OpBuilder &builder, TypeRange types,
+ ValueRange inputs,
+ Location loc) -> SmallVector<Value> {
+ if (inputs.size() != 1)
+ return {};
+
+ if (!isa<TDMDescriptorType>(inputs[0].getType()))
----------------
Hardcode84 wrote:
Can you add some comments??
https://github.com/llvm/llvm-project/pull/172686
More information about the Mlir-commits
mailing list