Unsigned integer types are supported in subgroup mma ops by matching
against arith.extui ops. This allows for subgroup_mma_compute ops with
mixed signedness which requires later conversions to handle this. SPIR-V
cooperative matrix ops support this while the lowering to WMMA does not.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LG, thanks!
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp | ||
---|---|---|
544 | Nit: use a ternary operator to select between IntegerType::Signed and IntegerType::Unsigned to avoid duplication? |
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp | ||
---|---|---|
544 | InferFragType is templated and would require a cast anyway so it's not clear to me that this is better. Would it be preferred to put this in its own templated function and update elType etc. by reference instead? |
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp | ||
---|---|---|
544 | @antiagainst gentle bump on this comment. If it's not a problem then I'll land this. |
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp | ||
---|---|---|
544 | Feel free to remove the template from InferFragType and make it: static const char *inferFragType(Operation* op) { assert(op->getNumResults() == 1); for (Operation *users : op->getUsers()) { auto contract = dyn_cast<vector::ContractionOp>(users); if (!contract) continue; if (contract.getLhs() == op.getResult(0)) return "AOp"; if (contract.getRhs() == op.getResult(0)) return "BOp"; } return "COp"; } |
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp | ||
---|---|---|
502–503 | can you assert than op has exactly 1 result? |
can you assert than op has exactly 1 result?