ops.hpp 1.11 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)
Catheriany's avatar
Catheriany committed
10
DECLARE_INFINIOP_TEST(rope)
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
 */
Catheriany's avatar
Catheriany committed
24
25
26
27
28
#define TEST_BUILDER_MAPPINGS                     \
    {                                             \
        REGISTER_INFINIOP_TEST(gemm)              \
            REGISTER_INFINIOP_TEST(random_sample) \
                REGISTER_INFINIOP_TEST(rope)}
29
30

namespace infiniop_test {
PanZezhong's avatar
PanZezhong committed
31
32

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

} // namespace infiniop_test

#endif