MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1#pragma once
2
3#include <mim/axm.h>
4#include <mim/plugin.h>
5
6/// @namespace mim::plug::tensor @ref tensor
7namespace mim {
8namespace plug::tensor {
9
10static constexpr plugin_t Plugin_Id = 0x5463d44130000000;
11
12/// @name %%tensor.map
13///@{
14enum class map : flags_t {
15};
16
17///@}
18
19/// @name %%tensor.transpose
20///@{
21enum class transpose : flags_t {
22};
23
24///@}
25
26/// @name %%tensor.slice
27///@{
28enum class slice : flags_t {
29};
30
31///@}
32
33/// @name %%tensor.reshape
34///@{
35enum class reshape : flags_t {
36};
37
38///@}
39
40/// @name %%tensor.dot_general
41///@{
42enum class dot_general : flags_t {
43};
44
45const Def* normalize_dot(const Def*, const Def*, const Def*);
46///@}
47
48/// @name %%tensor.dot_2d_00
49///@{
50enum class dot_2d_00 : flags_t {
51};
52
53///@}
54
55/// @name %%tensor.dot_2d_01
56///@{
57enum class dot_2d_01 : flags_t {
58};
59
60///@}
61
62/// @name %%tensor.dot_2d_10
63///@{
64enum class dot_2d_10 : flags_t {
65};
66
67///@}
68
69/// @name %%tensor.dot_2d_11
70///@{
71enum class dot_2d_11 : flags_t {
72};
73
74///@}
75
76/// @name %%tensor.broadcast_in_dim
77///@{
79};
80
81///@}
82
83/// @name %%tensor.reduce
84///@{
85enum class reduce : flags_t {
86};
87
88///@}
89
90/// @name %%tensor.map_reduce
91///@{
92enum class map_reduce : flags_t {
93};
94
95///@}
96
98
99#define MIM_tensor_NORMALIZER_IMPL \
100 void register_normalizers(Normalizers& normalizers) {\
101 normalizers[flags_t(Annex::Base<dot_general>)] = &normalize_dot; \
102 }
103} // namespace plug::tensor
104
105#ifndef DOXYGEN // don't include in Doxygen documentation
106
107template<> constexpr flags_t Annex::Base<plug::tensor::map> = 0x5463d44130000000;
108template<> constexpr size_t Annex::Num<plug::tensor::map> = 0;
109template<> constexpr flags_t Annex::Base<plug::tensor::transpose> = 0x5463d44130000100;
110template<> constexpr size_t Annex::Num<plug::tensor::transpose> = 0;
111template<> constexpr flags_t Annex::Base<plug::tensor::slice> = 0x5463d44130000200;
112template<> constexpr size_t Annex::Num<plug::tensor::slice> = 0;
113template<> constexpr flags_t Annex::Base<plug::tensor::reshape> = 0x5463d44130000300;
114template<> constexpr size_t Annex::Num<plug::tensor::reshape> = 0;
115template<> constexpr flags_t Annex::Base<plug::tensor::dot_general> = 0x5463d44130000400;
116template<> constexpr size_t Annex::Num<plug::tensor::dot_general> = 0;
117template<> constexpr flags_t Annex::Base<plug::tensor::dot_2d_00> = 0x5463d44130000500;
118template<> constexpr size_t Annex::Num<plug::tensor::dot_2d_00> = 0;
119template<> constexpr flags_t Annex::Base<plug::tensor::dot_2d_01> = 0x5463d44130000600;
120template<> constexpr size_t Annex::Num<plug::tensor::dot_2d_01> = 0;
121template<> constexpr flags_t Annex::Base<plug::tensor::dot_2d_10> = 0x5463d44130000700;
122template<> constexpr size_t Annex::Num<plug::tensor::dot_2d_10> = 0;
123template<> constexpr flags_t Annex::Base<plug::tensor::dot_2d_11> = 0x5463d44130000800;
124template<> constexpr size_t Annex::Num<plug::tensor::dot_2d_11> = 0;
125template<> constexpr flags_t Annex::Base<plug::tensor::broadcast_in_dim> = 0x5463d44130000900;
126template<> constexpr size_t Annex::Num<plug::tensor::broadcast_in_dim> = 0;
127template<> constexpr flags_t Annex::Base<plug::tensor::reduce> = 0x5463d44130000a00;
128template<> constexpr size_t Annex::Num<plug::tensor::reduce> = 0;
129template<> constexpr flags_t Annex::Base<plug::tensor::map_reduce> = 0x5463d44130000b00;
130template<> constexpr size_t Annex::Num<plug::tensor::map_reduce> = 0;
131
132
133#endif
134} // namespace mim
135
136#ifndef DOXYGEN // don't include in Doxygen documentation
137
138
139#endif
Base class for all Defs.
Definition def.h:198
The tensor Plugin
const Def * normalize_dot(const Def *, const Def *, const Def *)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
void register_normalizers(Normalizers &normalizers)
Definition ast.h:14
u64 flags_t
Definition types.h:45
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:19
u64 plugin_t
Definition types.h:46
static constexpr size_t Num
Definition plugin.h:115
static constexpr flags_t Base
Definition plugin.h:118