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///@}
18
19/// @name %%btensor.id
20///@{
21enum class id : flags_t {
22};
23
24///@}
25
26/// @name %%btensor.map_reduce
27///@{
28enum class map_reduce : flags_t {
29};
30
31const Def* normalize_map_reduce(const Def*, const Def*, const Def*);
32///@}
33
34/// @name %%btensor.map_reduce_post
35///@{
37};
38
39///@}
40
41/// @name %%btensor.mk_sched
42///@{
43enum class mk_sched : flags_t {
44};
45
46///@}
47
48/// @name %%btensor.proj_map
49///@{
50enum class proj_map : flags_t {
51};
52
53///@}
54
55/// @name %%btensor.broadcast
56///@{
57enum class broadcast : flags_t {
58};
59
60///@}
61
62/// @name %%btensor.concat
63///@{
64enum class concat : flags_t {
65};
66
67///@}
68
69/// @name %%btensor.pad
70///@{
71enum class pad : flags_t {
72};
73
74///@}
75
76/// @name %%btensor.transpose_2d
77///@{
78enum class transpose_2d : flags_t {
79};
80
81///@}
82
83/// @name %%btensor.product_2d
84///@{
85enum class product_2d : flags_t {
86};
87
88///@}
89
90/// @name %%btensor.gather
91///@{
92enum class gather : flags_t {
93};
94
95///@}
96
97/// @name %%btensor.scatter
98///@{
99enum class scatter : flags_t {
100};
101
102///@}
103
104/// @name %%btensor.NestT
105///@{
106enum class NestT : flags_t {
107};
108
109///@}
110
111/// @name %%btensor.mr_nest
112///@{
113enum class mr_nest : flags_t {
114};
115
116///@}
117
118/// @name %%btensor.lower_map_reduce
119///@{
121};
122
123///@}
124
126
127#define MIM_btensor_NORMALIZER_IMPL \
128 void register_normalizers(Normalizers& normalizers) {\
129 normalizers[flags_t(Annex::Base<map_reduce>)] = &normalize_map_reduce; \
130 }
131} // namespace plug::btensor
132
133#ifndef DOXYGEN // don't include in Doxygen documentation
134
135template<> constexpr flags_t Annex::Base<plug::btensor::Ring> = 0xd518f5104c00000;
136template<> constexpr size_t Annex::Num<plug::btensor::Ring> = 0;
137template<> constexpr flags_t Annex::Base<plug::btensor::id> = 0xd518f5104c00100;
138template<> constexpr size_t Annex::Num<plug::btensor::id> = 0;
139template<> constexpr flags_t Annex::Base<plug::btensor::map_reduce> = 0xd518f5104c00200;
140template<> constexpr size_t Annex::Num<plug::btensor::map_reduce> = 0;
141template<> constexpr flags_t Annex::Base<plug::btensor::map_reduce_post> = 0xd518f5104c00300;
142template<> constexpr size_t Annex::Num<plug::btensor::map_reduce_post> = 0;
143template<> constexpr flags_t Annex::Base<plug::btensor::mk_sched> = 0xd518f5104c00400;
144template<> constexpr size_t Annex::Num<plug::btensor::mk_sched> = 0;
145template<> constexpr flags_t Annex::Base<plug::btensor::proj_map> = 0xd518f5104c00500;
146template<> constexpr size_t Annex::Num<plug::btensor::proj_map> = 0;
147template<> constexpr flags_t Annex::Base<plug::btensor::broadcast> = 0xd518f5104c00600;
148template<> constexpr size_t Annex::Num<plug::btensor::broadcast> = 0;
149template<> constexpr flags_t Annex::Base<plug::btensor::concat> = 0xd518f5104c00700;
150template<> constexpr size_t Annex::Num<plug::btensor::concat> = 0;
151template<> constexpr flags_t Annex::Base<plug::btensor::pad> = 0xd518f5104c00800;
152template<> constexpr size_t Annex::Num<plug::btensor::pad> = 0;
153template<> constexpr flags_t Annex::Base<plug::btensor::transpose_2d> = 0xd518f5104c00900;
154template<> constexpr size_t Annex::Num<plug::btensor::transpose_2d> = 0;
155template<> constexpr flags_t Annex::Base<plug::btensor::product_2d> = 0xd518f5104c00a00;
156template<> constexpr size_t Annex::Num<plug::btensor::product_2d> = 0;
157template<> constexpr flags_t Annex::Base<plug::btensor::gather> = 0xd518f5104c00b00;
158template<> constexpr size_t Annex::Num<plug::btensor::gather> = 0;
159template<> constexpr flags_t Annex::Base<plug::btensor::scatter> = 0xd518f5104c00c00;
160template<> constexpr size_t Annex::Num<plug::btensor::scatter> = 0;
161template<> constexpr flags_t Annex::Base<plug::btensor::NestT> = 0xd518f5104c00d00;
162template<> constexpr size_t Annex::Num<plug::btensor::NestT> = 0;
163template<> constexpr flags_t Annex::Base<plug::btensor::mr_nest> = 0xd518f5104c00e00;
164template<> constexpr size_t Annex::Num<plug::btensor::mr_nest> = 0;
165template<> constexpr flags_t Annex::Base<plug::btensor::lower_map_reduce> = 0xd518f5104c00f00;
166template<> constexpr size_t Annex::Num<plug::btensor::lower_map_reduce> = 0;
167
168template<> struct Axm::IsANode<plug::btensor::Ring> { using type = Axm; };
169template<> struct Axm::IsANode<plug::btensor::id> { using type = Axm; };
170template<> struct Axm::IsANode<plug::btensor::mk_sched> { using type = Axm; };
171template<> struct Axm::IsANode<plug::btensor::proj_map> { using type = Axm; };
172template<> struct Axm::IsANode<plug::btensor::transpose_2d> { using type = Axm; };
173template<> struct Axm::IsANode<plug::btensor::product_2d> { using type = Axm; };
174template<> struct Axm::IsANode<plug::btensor::NestT> { using type = Axm; };
175template<> struct Axm::IsANode<plug::btensor::mr_nest> { using type = Axm; };
176template<> struct Axm::IsANode<plug::btensor::lower_map_reduce> { using type = Axm; };
177
178#endif
179} // namespace mim
180
181#ifndef DOXYGEN // don't include in Doxygen documentation
182
183
184#endif
Base class for all Defs.
Definition def.h:273
The btensor Plugin
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 flags_t
Definition types.h:39
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:27
u64 plugin_t
Definition types.h:40
@ Axm
Definition def.h:122
static constexpr size_t Num
Number of Axm::subtags.
Definition plugin.h:247
static constexpr flags_t Base
Definition plugin.h:248