Generate list of configurations to test
()
| 260 | |
| 261 | |
| 262 | def 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 | |
| 296 | def main(): |