Add MatrixTimesMatrix operation to SPIRV Dialect and add NoSideEffect trait to Matrix ops.
By construct a MatrixType's element type is VectorType. so this is gonna succeed so there is no need to wrap it in a if statement. Essentially I think writing something like the following might look nicer:
c++ auto leftM = leftMatrix.getNumElements(); auto leftVector = leftMatrix.getElementType().cast<VectorType>(); auto leftN = leftVector.getNumElements(); auto leftElemType = leftVector.getElementType(); // Similarly for rightMatrix and result Matrix
What do you think?
I agree that this is better. In fact, I had some changes in mind for the matrix type, mainly:
These are minor changes coding wise, but they will make the verification methods much nicer than they are now, and the code easier to follow. And honestly they are intuitive for a matrix type. How that sounds?