diff options
author | Kenneth Heafield <github@kheafield.com> | 2020-04-24 00:39:21 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2020-04-24 00:39:21 +0300 |
commit | f7c02f88cad0766537a3307eff1d6f15af6ed015 (patch) | |
tree | 5cd150e219331d31aebb7f1506d6f610cddbf36e | |
parent | ed5ba5e5eb56d6cd44913d8efb29f3fed248b039 (diff) |
Oops use memcmp in test for whole array
-rw-r--r-- | test/tile_test.inl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tile_test.inl b/test/tile_test.inl index bd5c891..24decca 100644 --- a/test/tile_test.inl +++ b/test/tile_test.inl @@ -194,7 +194,7 @@ template <class Kernel> void TestMultiplyNoOverhang(Tile shape) { TestMatrices t(shape); AlignedVector<int32_t> C_test(shape.A_rows * shape.B_cols); MultiplyNoOverhang<TestMatrices::AccessT, Kernel>(t.AccessTest(C_test), shape); - CHECK(!memcmp(t.C_reference.begin(), C_test.begin(), shape.A_rows * shape.B_cols)); + CHECK(!memcmp(t.C_reference.begin(), C_test.begin(), shape.A_rows * shape.B_cols * sizeof(int32_t))); /* for (Index i = 0; i < shape.A_rows; ++i) { for (Index j = 0; j < shape.B_cols; ++j) { CHECK(t.C_reference[i * shape.B_cols + j] == C_test[i * shape.B_cols + j]); @@ -308,7 +308,10 @@ TEST_CASE("Multiply " INTGEMM_TEST_NAME, "[tile][multiply]") { TestMatrices t(shape); AlignedVector<int32_t> C_test(shape.A_rows * shape.B_cols); Multiply<TestMatrices::AccessT, Signed8, 7, 3>(t.AccessTest(C_test), shape); - CHECK(!memcmp(t.C_reference.begin(), C_test.begin(), shape.A_rows * shape.B_cols)); + CHECK(!memcmp(t.C_reference.begin(), C_test.begin(), shape.A_rows * shape.B_cols * sizeof(int32_t))); + memset(C_test.begin(), 0, shape.A_rows * shape.B_cols); + Multiply<TestMatrices::AccessT, Signed8, 4, 5>(t.AccessTest(C_test), shape); + CHECK(!memcmp(t.C_reference.begin(), C_test.begin(), shape.A_rows * shape.B_cols * sizeof(int32_t))); } } } |