@@ -172,6 +172,50 @@ struct PVCuArch : public Xe2Plus {
172
172
};
173
173
} // namespace PVCuArch
174
174
175
+ namespace BMGuArch {
176
+ struct BMGuArch : public Xe2Plus {
177
+ // Maintaines ownership of the instructions owned by PVUarch
178
+ std::vector<std::unique_ptr<Instruction>> owned_instructions;
179
+ BMGuArch ()
180
+ : Xe2Plus(" bmg" , // archName
181
+ " Battlemage Architecture" , // archDescription
182
+ XeCoreInfo (8 , SharedMemory(256 * 1024 , 4 ), 8, 8), // xeCore
183
+ {/* register_file_info */ }, // Optional: empty
184
+ {/* cache_info */ }, // Optional: empty
185
+ {/* instructions */ }, // Optional: empty
186
+ {/* restrictions */ } // Optional: empty
187
+ ) {
188
+ // Initialize uArchHierarchy
189
+ this ->uArch_hierarchy .push_back (uArchHierarchyComponent (" thread" , 0 ));
190
+ this ->uArch_hierarchy .push_back (uArchHierarchyComponent (" XeCore" , 8 ));
191
+ this ->uArch_hierarchy .push_back (uArchHierarchyComponent (" XeSlice" , 4 ));
192
+ this ->uArch_hierarchy .push_back (uArchHierarchyComponent (" XeStack" , 5 ));
193
+ this ->uArch_hierarchy .push_back (uArchHierarchyComponent (" gpu" , 1 ));
194
+ // Intialize register file info
195
+ // GRF
196
+ this ->register_file_info [" GRF" ] =
197
+ RegisterFileInfo (64 * 1024 , // size in bits
198
+ {" small" , " large" }, // GRF modes
199
+ {128 , 256 }, // registers per thread per mode
200
+ 0 , // number of banks
201
+ 0 // bank size
202
+ );
203
+ // Initialize cache info
204
+ // L1 cache, XeCore level
205
+ this ->cache_info .push_back (
206
+ CacheInfo (256 * 1024 , 64 , this ->uArch_hierarchy [1 ]));
207
+ // L3 cache, XeStack level
208
+ this ->cache_info .push_back (
209
+ CacheInfo (18 * 1024 * 1024 , 256 , this ->uArch_hierarchy [3 ]));
210
+
211
+ // Add the instructions
212
+ auto dpas = std::make_unique<DPASInstruction>();
213
+ instructions[dpas->name ] = dpas.get ();
214
+ owned_instructions.push_back (std::move (dpas));
215
+ }
216
+ };
217
+ } // namespace BMGuArch
218
+
175
219
} // namespace Xe2Plus
176
220
} // namespace uArch
177
221
} // namespace xegpu
0 commit comments