Skip to content

Commit

Permalink
test_blas_tile_extensione copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Guglielmo Gagliardi committed Jan 2, 2024
1 parent 81f29f5 commit 1960032
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/unit/test_blas_tile_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,36 @@ TYPED_TEST(TileOperationsExtensionsTestGPU, Scal) {
}
}
#endif

// Tuple elements: m, n, k, extra_lda, extra_ldb, extra_ldc
std::vector<std::tuple<SizeType, SizeType, SizeType, SizeType, SizeType, SizeType>> gemm_sizes = {
{0, 0, 0, 0, 0, 0}, // all 0 sizes
{7, 0, 0, 3, 1, 0}, {0, 5, 0, 0, 0, 1}, {0, 0, 11, 1, 1, 2}, // two 0 sizes
{0, 5, 13, 1, 0, 1}, {7, 0, 4, 1, 2, 0}, {3, 11, 0, 0, 1, 0}, // one 0 size
{1, 1, 1, 0, 3, 0}, {1, 12, 1, 1, 0, 7}, {17, 12, 16, 1, 3, 0}, {11, 23, 8, 0, 3, 4},
{6, 9, 12, 1, 1, 1}, {32, 32, 32, 0, 0, 0}, {32, 32, 32, 4, 5, 7}, {128, 128, 128, 0, 0, 0},
};

TYPED_TEST(TileOperationsExtensionsTestMC, Scal) {
using Type = TypeParam;
for (const auto& [m, n, k, extra_lda, extra_ldb, extra_ldc] : gemm_sizes) {
// Test a and b const Tiles.
dlaf::test::testScal<Device::CPU, Type>(m, n, extra_lda);
// Test a and b non const Tiles.
dlaf::test::testScal<Device::CPU, Type>(m, n, extra_lda);
}
}

#ifdef DLAF_WITH_GPU
TYPED_TEST(TileOperationsExtensionsTestGPU, Scal) {
using Type = TypeParam;

for (const auto& [m, n, k, extra_lda, extra_ldb, extra_ldc] : gemm_sizes) {
// Test a and b const Tiles.
dlaf::test::testScal<Device::GPU, Type>(m, n, extra_lda);

// Test a and b non const Tiles.
dlaf::test::testScal<Device::CPU, Type, Type>(m, n, extra_lda);
}
}
#endif

0 comments on commit 1960032

Please sign in to comment.