Skip to content

[SM6.10] LinAlg Validation: MatrixAccumulateToMemory - #8835

Merged
Ashley Coleman (V-FEXrt) merged 1 commit into
mainfrom
linalg-vali-matrixaccumulatetomemory
Sep 2, 2026
Merged

[SM6.10] LinAlg Validation: MatrixAccumulateToMemory#8835
Ashley Coleman (V-FEXrt) merged 1 commit into
mainfrom
linalg-vali-matrixaccumulatetomemory

Conversation

@V-FEXrt

Copy link
Copy Markdown
Collaborator

Fixes #8507

Implements LinAlg MatrixAccumulateToMemory validation rules


Stack created with GitHub Stacks CLIGive Feedback 💬

@damyanp Damyan Pepper (damyanp) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CI, ValidationRule::InstrLinAlgMatrixUseMismatch,
{"Input", MatrixUseToString(Mat->Use), "Accumulator"});

GEPOperator *GSGEP = cast<GEPOperator>(Op.get_memory());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Base automatically changed from linalg-vali-matrixstoretomemory to main September 1, 2026 21:35
Fixes #8507

Implements LinAlg MatrixAccumulateToMemory validation rules
@V-FEXrt
Ashley Coleman (V-FEXrt) force-pushed the linalg-vali-matrixaccumulatetomemory branch from 01ad128 to c6cf2ae Compare September 1, 2026 21:35
GlobalVariable *GSMem = cast<GlobalVariable>(GSGEP->getPointerOperand());
Type *GSMemInnerTy = GSMem->getType();
unsigned GSScalarCount = 1;
if (PointerType *GSMemPtrTy = dyn_cast<PointerType>(GSMemInnerTy))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC you mentioned this is always expected to be a pointer type. Should we make this an unconditional cast?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@alsepkow Alex Sepkowski (alsepkow) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bob80905 Joshua Batista (bob80905) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a non-blocking comment.

@V-FEXrt
Ashley Coleman (V-FEXrt) merged commit 953311f into main Sep 2, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Sep 2, 2026
@V-FEXrt
Ashley Coleman (V-FEXrt) deleted the linalg-vali-matrixaccumulatetomemory branch September 2, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

LinAlg Validation: MatrixAccumulateToMemory

4 participants