MCPcopy Create free account
hub / github.com/MegEngine/MegCC / TEST

Function TEST

compiler/test/kernel/opr/generalIntrinsic/Fp32Matmul.cpp:6–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace megcc::KernelGen;
5
6TEST(GI, Fp32MatMulM4N12) {
7 Checker<MatrixMulForward> checker(Arch::BAREMETAL);
8 MatrixMulForward::Param param;
9 checker.set_epsilon(2e-4);
10 checker.set_kernel_symbol("GI_kernel_fp32_matmul_4x12_.*");
11 for (bool trans_a : {false, true})
12 for (bool trans_b : {true, false})
13 for (size_t m : {1, 3, 58, 9, 10, 12, 23, 67})
14 for (size_t n : {1, 5, 6, 7, 8, 9, 10, 12, 24, 33})
15 for (size_t k : {1, 3, 5}) {
16 size_t a0 = m;
17 size_t a1 = k;
18 size_t b0 = k;
19 size_t b1 = n;
20 if (trans_a) {
21 a0 = k, a1 = m;
22 }
23 if (trans_b) {
24 b0 = n, b1 = k;
25 }
26 param.transposeA = trans_a;
27 param.transposeB = trans_b;
28 checker.set_param(param);
29 checker.execs({{a0, a1}, {b0, b1}, {}});
30 }
31}
32
33TEST(GI, Fp32MatMulM4N8K4) {
34 Checker<MatrixMulForward> checker(Arch::BAREMETAL);

Callers

nothing calls this directly

Calls 1

execsMethod · 0.45

Tested by

no test coverage detected