MCPcopy Create free account
hub / github.com/microsoft/BitNet / generate_configurations

Function generate_configurations

utils/tune_gemm_config.py:262–293  ·  view source on GitHub ↗

Generate list of configurations to test

()

Source from the content-addressed store, hash-verified

260
261
262def generate_configurations():
263 """Generate list of configurations to test"""
264 configurations = []
265
266 act_parallel_options = [True]
267
268 row_sizes = [2, 4, 8]#[2, 4, 8, 16, 32]
269 col_sizes = [32, 64]#[32, 64, 128, 256, 512, 1024]
270 parallelism_degree = [4]
271
272 for act_parallel in act_parallel_options:
273 for row in row_sizes:
274 for col in col_sizes:
275 for parallel in parallelism_degree:
276 # Add filtering conditions
277 if act_parallel:
278 # When ACT_PARALLEL=True, only calculate combinations with parallel < row
279 if parallel > row:
280 continue
281 else:
282 # When ACT_PARALLEL=False, only calculate combinations with parallel < col
283 if parallel > col:
284 continue
285
286 configurations.append({
287 'act_parallel': act_parallel,
288 'row_block_size': row,
289 'col_block_size': col,
290 'parallel_size': parallel
291 })
292
293 return configurations
294
295
296def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected