Commit Graph

3 Commits

Author SHA1 Message Date
Robin Voetter
d15334ed0d ck-builder: ck factory grouped conv fwd 2025-10-27 13:33:06 +01:00
Robin Voetter
c07b436666 ck-builder: add InstanceSet and InstanceMatcher
These types can be used to check whether a list of instances
defined statically/obtained from a DeviceOp is congruent. We don't
care about the order, just which items are present or not. Note that
when GetInstanceString() is not implemented for a particular kernel,
it returns "" (via the base class implementation). When this is the
case, tests should temporarily add "" to the expected list of
instances until the implementation is done.
2025-10-27 13:31:16 +01:00
kabrahamAMD
e576992dca [CK_BUILDER] Add inline string diff for tests (#3067)
Adds new testing functionality: an inline diff for string comparison.

Example usage:

EXPECT_THAT("Actual string", ck_tile::test::StringEqWithDiff("Expected string"));

Failure message:

Value of: "Actual string"
Expected: "Expected string"
Actual: "Actual string" (of type char [14]),
Diff: "[Expe|A]ct[ed|ual] string"

The inline-diff function uses the Wagner-Fischer algorithm to find the minimum edit distance and generate diff markers, which has O(N^2) complexity. It has optional color codes that are enabled with the matcher.
2025-10-25 07:22:41 -07:00