[Mlir-commits] [mlir] [mlir][amdgpu] Add tensor load store operations (PR #172686)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Wed Dec 17 09:08:54 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()))
----------------
amd-eochoalo wrote:
Added comment here : https://github.com/llvm/llvm-project/pull/172686/commits/2f55093c5210964de3e71bab95b1210edb352c67 (I'm not too sure how much to add there, the comment above is a little bit more meta than one suitable for an in code comment in my opinion. Let me know what you think! Happy to make edits.)
https://github.com/llvm/llvm-project/pull/172686
More information about the Mlir-commits
mailing list