MimIR
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::btensor @ref btensor
7namespace mim {
8namespace plug::btensor {
9
10static constexpr plugin_t Plugin_Id = 0xd518f5104c00000;
11
12/// @name `btensor.Ring`
13///@{
14enum class Ring : flags_t {
15};
16
17/// The fields of `btensor.Ring`, by index.
18struct Ring_field { enum : nat_t { T = 0, _0 = 1, add = 2, mul = 3, }; };
19
20///@}
21
22/// @name `btensor.id`
23///@{
24enum class id : flags_t {
25};
26
27///@}
28
29/// @name `btensor.map_reduce`
30///@{
31enum class map_reduce : flags_t {
32};
33
34const Def* normalize_map_reduce(const Def*, const Def*, const Def*);
35///@}
36
37/// @name `btensor.map_reduce_post`
38///@{
40};
41
42///@}
43
44/// @name `btensor.Sched`
45///@{
46enum class Sched : flags_t {
47};
48
49/// The fields of `btensor.Sched`, by index.
50struct Sched_field { enum : nat_t { vdim = 0, unroll = 1, }; };
51
52///@}
53
54/// @name `btensor.SchedT`
55///@{
56enum class SchedT : flags_t {
57};
58
59///@}
60
61/// @name `btensor.mk_sched`
62///@{
63enum class mk_sched : flags_t {
64};
65
66///@}
67
68/// @name `btensor.proj_map`
69///@{
70enum class proj_map : flags_t {
71};
72
73///@}
74
75/// @name `btensor.broadcast`
76///@{
77enum class broadcast : flags_t {
78};
79
80///@}
81
82/// @name `btensor.concat`
83///@{
84enum class concat : flags_t {
85};
86
87///@}
88
89/// @name `btensor.pad`
90///@{
91enum class pad : flags_t {
92};
93
94///@}
95
96/// @name `btensor.gather`
97///@{
98enum class gather : flags_t {
99};
100
101///@}
102
103/// @name `btensor.scatter`
104///@{
105enum class scatter : flags_t {
106};
107
108///@}
109
110/// @name `btensor.NestT`
111///@{
112enum class NestT : flags_t {
113};
114
115///@}
116
117/// @name `btensor.mr_nest`
118///@{
119enum class mr_nest : flags_t {
120};
121
122///@}
123
124/// @name `btensor.map_reduce_post_impl`
125///@{
127};
128
129///@}
130
131/// @name `btensor.lower_map_reduce`
132///@{
134};
135
136///@}
137
139
140#define MIM_btensor_NORMALIZER_IMPL \
141 void register_normalizers(Normalizers& normalizers) {\
142 normalizers[flags_t(Annex::Base<map_reduce>)] = &normalize_map_reduce; \
143 }
144} // namespace plug::btensor
145
146#ifndef DOXYGEN // don't include in Doxygen documentation
147
148template<> constexpr flags_t Annex::Base<plug::btensor::Ring> = 0xd518f5104c00000;
149template<> constexpr size_t Annex::Num<plug::btensor::Ring> = 0;
150template<> constexpr flags_t Annex::Base<plug::btensor::id> = 0xd518f5104c00100;
151template<> constexpr size_t Annex::Num<plug::btensor::id> = 0;
152template<> constexpr flags_t Annex::Base<plug::btensor::map_reduce> = 0xd518f5104c00200;
153template<> constexpr size_t Annex::Num<plug::btensor::map_reduce> = 0;
154template<> constexpr flags_t Annex::Base<plug::btensor::map_reduce_post> = 0xd518f5104c00300;
155template<> constexpr size_t Annex::Num<plug::btensor::map_reduce_post> = 0;
156template<> constexpr flags_t Annex::Base<plug::btensor::Sched> = 0xd518f5104c00400;
157template<> constexpr size_t Annex::Num<plug::btensor::Sched> = 0;
158template<> constexpr flags_t Annex::Base<plug::btensor::SchedT> = 0xd518f5104c00500;
159template<> constexpr size_t Annex::Num<plug::btensor::SchedT> = 0;
160template<> constexpr flags_t Annex::Base<plug::btensor::mk_sched> = 0xd518f5104c00600;
161template<> constexpr size_t Annex::Num<plug::btensor::mk_sched> = 0;
162template<> constexpr flags_t Annex::Base<plug::btensor::proj_map> = 0xd518f5104c00700;
163template<> constexpr size_t Annex::Num<plug::btensor::proj_map> = 0;
164template<> constexpr flags_t Annex::Base<plug::btensor::broadcast> = 0xd518f5104c00800;
165template<> constexpr size_t Annex::Num<plug::btensor::broadcast> = 0;
166template<> constexpr flags_t Annex::Base<plug::btensor::concat> = 0xd518f5104c00900;
167template<> constexpr size_t Annex::Num<plug::btensor::concat> = 0;
168template<> constexpr flags_t Annex::Base<plug::btensor::pad> = 0xd518f5104c00a00;
169template<> constexpr size_t Annex::Num<plug::btensor::pad> = 0;
170template<> constexpr flags_t Annex::Base<plug::btensor::gather> = 0xd518f5104c00b00;
171template<> constexpr size_t Annex::Num<plug::btensor::gather> = 0;
172template<> constexpr flags_t Annex::Base<plug::btensor::scatter> = 0xd518f5104c00c00;
173template<> constexpr size_t Annex::Num<plug::btensor::scatter> = 0;
174template<> constexpr flags_t Annex::Base<plug::btensor::NestT> = 0xd518f5104c00d00;
175template<> constexpr size_t Annex::Num<plug::btensor::NestT> = 0;
176template<> constexpr flags_t Annex::Base<plug::btensor::mr_nest> = 0xd518f5104c00e00;
177template<> constexpr size_t Annex::Num<plug::btensor::mr_nest> = 0;
178template<> constexpr flags_t Annex::Base<plug::btensor::map_reduce_post_impl> = 0xd518f5104c00f00;
179template<> constexpr size_t Annex::Num<plug::btensor::map_reduce_post_impl> = 0;
180template<> constexpr flags_t Annex::Base<plug::btensor::lower_map_reduce> = 0xd518f5104c01000;
181template<> constexpr size_t Annex::Num<plug::btensor::lower_map_reduce> = 0;
182
183template<> struct Axm::IsANode<plug::btensor::Ring> { using type = Axm; };
184template<> struct Axm::IsANode<plug::btensor::id> { using type = Axm; };
185template<> struct Axm::IsANode<plug::btensor::Sched> { using type = Axm; };
186template<> struct Axm::IsANode<plug::btensor::SchedT> { using type = Axm; };
187template<> struct Axm::IsANode<plug::btensor::mk_sched> { using type = Axm; };
188template<> struct Axm::IsANode<plug::btensor::proj_map> { using type = Axm; };
189template<> struct Axm::IsANode<plug::btensor::NestT> { using type = Axm; };
190template<> struct Axm::IsANode<plug::btensor::mr_nest> { using type = Axm; };
191template<> struct Axm::IsANode<plug::btensor::map_reduce_post_impl> { using type = Axm; };
192template<> struct Axm::IsANode<plug::btensor::lower_map_reduce> { using type = Axm; };
193
194#endif
195} // namespace mim
196
197#ifndef DOXYGEN // don't include in Doxygen documentation
198
199
200#endif
Base class for all Defs.
Definition def.h:289
The btensor Plugin
Definition btensor.h:17
const Def * normalize_map_reduce(const Def *, const Def *c, const Def *arg)
btensor.map_reduce is btensor.map_reduce_post without the epilogue and with the neutral schedule: del...
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
void register_normalizers(Normalizers &normalizers)
Definition ast.h:16
u64 nat_t
Definition types.h:37
u64 flags_t
Definition types.h:39
ankerl::unordered_dense::map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:27
u64 plugin_t
Definition types.h:40
@ Axm
Definition def.h:125
static constexpr size_t Num
Number of Axm::subtags.
Definition plugin.h:273
static constexpr flags_t Base
Definition plugin.h:274
The fields of btensor.Ring, by index.
Definition autogen.h:18
The fields of btensor.Sched, by index.
Definition autogen.h:50