[SM6.10] LinAlg Validation: MatrixAccumulateToMemory - #8835
Conversation
| CI, ValidationRule::InstrLinAlgMatrixUseMismatch, | ||
| {"Input", MatrixUseToString(Mat->Use), "Accumulator"}); | ||
|
|
||
| GEPOperator *GSGEP = cast<GEPOperator>(Op.get_memory()); |
There was a problem hiding this comment.
Some of the code from here downwards looks extremely similar to some of the code in #8834. Is there a shared helper that could be factored out?
There was a problem hiding this comment.
Yeah the code is almost identical but there are some extra chunks in various places that make a giant reused function not work. Once the stack merges I'll circle around and look into extracting some of them. Some the of pending changes also make the duplicated code a bit simpler as well
Fixes #8507 Implements LinAlg MatrixAccumulateToMemory validation rules
01ad128 to
c6cf2ae
Compare
| GlobalVariable *GSMem = cast<GlobalVariable>(GSGEP->getPointerOperand()); | ||
| Type *GSMemInnerTy = GSMem->getType(); | ||
| unsigned GSScalarCount = 1; | ||
| if (PointerType *GSMemPtrTy = dyn_cast<PointerType>(GSMemInnerTy)) |
There was a problem hiding this comment.
IIRC you mentioned this is always expected to be a pointer type. Should we make this an unconditional cast?
There was a problem hiding this comment.
There is a better way to do this whole block of code (including this condition) that Chris suggested! I'm waiting to make that change until the whole stack goes in though
Joshua Batista (bob80905)
left a comment
There was a problem hiding this comment.
I left a non-blocking comment.
Fixes #8507
Implements LinAlg MatrixAccumulateToMemory validation rules
Stack created with GitHub Stacks CLI • Give Feedback 💬