This allow declaring buffers and alloc of vectors so that we can support vector load/store.
Details
Diff Detail
Event Timeline
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
355 | Maybe we can have something like Type elementType = type.getElementType(); Type arrayElemType = nullptr; if (auto vecType = dyn_cast<VectorType>(elementType)) { arrayElementType = ... } else if (auto scalarType = ...) { arrayElementType = ... } else { return llvm::None } ? | |
359 | double negative is confusing. Maybe say "illegal: can convert memrefs of either scalar or vector element type only" Though I dont know why these are "illegal". It should be "unhandled" |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
359 | Sure, I rephrased it. |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
355–359 | convertScalarType and convertVectorType return Optional<Type> so I would need extra handling if I don't use Optional<>. I think that's the most natural way to do it? What do you think? |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
355–359 | I didnt realize that. Then this is fine. Sorry for the noise. |
Maybe we can have something like
?