ops.hpp 1.1 KB
Newer Older
1
2
3
4
5
6
7
#ifndef __INFINIOPTEST_OPS_HPP__
#define __INFINIOPTEST_OPS_HPP__
#include "test.hpp"

/*
 * Declare all the tests here
 */
PanZezhong's avatar
PanZezhong committed
8
DECLARE_INFINIOP_TEST(gemm)
9
DECLARE_INFINIOP_TEST(random_sample)
Graylatzhou's avatar
Graylatzhou committed
10
DECLARE_INFINIOP_TEST(mul)
11

12
13
14
15
16
17
18
19
#define REGISTER_INFINIOP_TEST(name)                      \
    {                                                     \
        #name,                                            \
        {                                                 \
            infiniop_test::name::Test::build,             \
            infiniop_test::name::Test::attribute_names(), \
            infiniop_test::name::Test::tensor_names(),    \
        }},
20
21
22
23

/*
 * Register all the tests here
 */
24
25
26
27
#define TEST_BUILDER_MAPPINGS                 \
    {                                         \
        REGISTER_INFINIOP_TEST(gemm)          \
        REGISTER_INFINIOP_TEST(random_sample) \
Graylatzhou's avatar
Graylatzhou committed
28
        REGISTER_INFINIOP_TEST(mul)          \
29
30
31
    }

namespace infiniop_test {
PanZezhong's avatar
PanZezhong committed
32
33

// Global variable for {op_name: builder} mappings
34
35
36
37
38
extern std::unordered_map<std::string, const TestBuilder> TEST_BUILDERS;

} // namespace infiniop_test

#endif