feat(hipdnn): add tensor attribute equality helpers#8589
Conversation
|
Thanks for the contribution! Approving workflow run. |
67322b1 to
39a9ec6
Compare
046d0e7 to
3168cfa
Compare
d461273 to
d65aef1
Compare
d65aef1 to
08a1cee
Compare
|
Okay updating from latest, and will get this merged once it passes. |
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
|
@MarijaGijic the changes look good generally, but pre-commit & tidy needs to be passing on this before we can merge. Heads up, there is also #8728 which would require changes to these equality checks depending on which lands first. |
f842424 to
0037573
Compare
|
Hi @BrianHarrisonAMD, just a quick update: I’ve resolved all the clang-tidy issues, so I hope the code itself is ready for merge. The not ready to review label is only remaining because of the PR bot bug ignoring legacy Test*.cpp files. I've opened an issue detailing the bug and a quick configuration fix here: #9010. Could you take a look when you get a chance so we can get this unblocked? Thanks! |
fixes #6385
Motivation
This PR implements structural and strict equality helper methods for
TensorAttributes. This lays the crucial foundation for fixing graph-level structural comparisons during graph transformation and lifting phases (as outlined in issue #6385). It allows developers to check if two tensors share the same shape and memory footprint without strictly enforcing internal metadata names.Technical Details
TensorAttributes::LogicallyEquals(): Added a comparison method that validates structural alignment—specifically checking dimensions (dim), stride, anddata_typewhile intentionally omitting names and UIDs.operator==andoperator!=: Implemented standard strict equality operators that verify both the underlying logical properties and exact identifier fields (including names and virtual flags).TensorLogicalAndStrictEqualitytest suite withinTestTensorAttributes.cppto explicitly cover all edge cases (dimension matches, scalar matching, name variations, and virtual status changes).Test Plan
The changes were compiled and validated locally within
therockDocker container environment using the native build tools.