ops.hpp 1.02 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)
10

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

/*
 * Register all the tests here
 */
23
24
25
26
#define TEST_BUILDER_MAPPINGS                 \
    {                                         \
        REGISTER_INFINIOP_TEST(gemm)          \
        REGISTER_INFINIOP_TEST(random_sample) \
27
28
29
    }

namespace infiniop_test {
PanZezhong's avatar
PanZezhong committed
30
31

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

} // namespace infiniop_test

#endif