Skip to content

Conversation

@gaurav-arya
Copy link
Member

@gaurav-arya gaurav-arya commented Nov 17, 2025

No description provided.

@gaurav-arya gaurav-arya changed the title feat: add symmetry detection for matmul and constants feat: add symmetry detection for matmul Nov 17, 2025
@gaurav-arya gaurav-arya changed the title feat: add symmetry detection for matmul feat: add symmetry detection for matmul and some small fixes to logic Nov 17, 2025
@gaurav-arya gaurav-arya changed the title feat: add symmetry detection for matmul and some small fixes to logic feat: add recursive symmetry checks for matmul etc. and make some small fixes to logic Nov 17, 2025
@gaurav-arya gaurav-arya force-pushed the symmetry branch 2 times, most recently from ae0cae7 to 1345bac Compare November 17, 2025 04:57
@gaurav-arya gaurav-arya marked this pull request as ready for review November 17, 2025 04:59
@gaurav-arya gaurav-arya changed the title feat: add recursive symmetry checks for matmul etc. and make some small fixes to logic feat: add recursive symmetry checks for matmul + check for existing attr Nov 17, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

EnzymeJAX Benchmarks

Benchmark suite Current: 173903f Previous: b55ffd4 Ratio
scatter_sum / JaX / cpu / Primal 0.00000438585311640054 s 0.000004338932399696205 s 1.01
scatter_sum / JaXPipe / cpu / Primal 0.000004262724006548524 s 0.000004298453299998073 s 0.99
scatter_sum / JaX / tpu / Primal 0.0001382552735041 s 0.0001558048111997 s 0.89
scatter_sum / JaXPipe / tpu / Primal 0.0001349988545058 s 0.0001522772955002 s 0.89

This comment was automatically generated by workflow using github-action-benchmark.

Comment on lines 663 to 665
if (isa<enzymexla::SymmOp>(op)) {
return State::GUARANTEED;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this generally true? it is true for syrk but not for symm if B is not symmetric

Copy link
Member Author

Choose a reason for hiding this comment

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

yup you're right, there's no op for syrk yet right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

correct

recursiveCheck = true;
}

if (isa<stablehlo::TransposeOp>(op), isa<stablehlo::DotGeneralOp>(op)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

for dot general it only holds if the operands commute, not in general I think

Copy link
Member

Choose a reason for hiding this comment

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

even then not necessarily since you could have batched dimensions

@gaurav-arya gaurav-arya changed the title feat: add recursive symmetry checks for matmul + check for existing attr feat: add recursive symmetry checks for transpose + check for existing attr Nov 18, 2025
@gaurav-arya gaurav-arya changed the title feat: add recursive symmetry checks for transpose + check for existing attr feat: add recursive symmetry check for transpose + check for existing attr Nov 18, 2025
@gaurav-arya
Copy link
Member Author

Okay I just got rid of the wrong checks

@gaurav-arya gaurav-arya changed the title feat: add recursive symmetry check for transpose + check for existing attr add recursive symmetry check for transpose + check for existing attr Nov 18, 2025
@gaurav-arya gaurav-arya changed the title add recursive symmetry check for transpose + check for existing attr add recursive symmetry checks + check for existing attr Nov 19, 2025
@avik-pal avik-pal requested a review from wsmoses November 20, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants