Commit 51d0748
authored
Testing: Defer leading dimension calculation when not specified in YAML (#467)
Benchmarking: Fix run to run variation caused by memory bloating in case
lds not mentioned
The YAML parser's computeMaxMinLegalLD() pre-computed a single
worst-case leading dimension across all cartesian-product parameter
combinations. This over-allocated LD will cause memory bloating.
Replace the parse-time LD computation with a ld=-1 sentinel that
defers resolution to the point of use:
- Remove computeMaxMinLegalLD() from yaml_parser.cc,emit ld=-1
when LDA/LDB/LDC are absent in YAML
- Update check_valid_params() in test_gemm.cc, test_batch_gemm.cc
to resolve ld=-1 into the correct per-config minimum LD
before validating constraints
- Add checkValidGemmParams() in bench_gemm.cc to validate configs
before fixture allocation, skipping invalid cartesian combinations
early and avoiding unnecessary Matrix construction
- Fixed testsuite segfaults being caused when negative ld's are passed
- Refactored unit tests to use new sentinel leading dimension = -1
The Matrix constructor handles leadingDim==-1 by computing
the correct value from rows/cols, so the sentinel flows cleanly
through both test and benchmark paths.
AMD-Internal: [CPUPL-8118] [CPUPL-8146]
Signed-off-by: Vishal A <Vishal.Akula@amd.com>1 parent 32ffabb commit 51d0748
10 files changed
Lines changed: 420 additions & 394 deletions
File tree
- bench
- tests
- classic
- framework
- utils
- include/framework
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
274 | 360 | | |
275 | 361 | | |
276 | 362 | | |
| |||
295 | 381 | | |
296 | 382 | | |
297 | 383 | | |
| 384 | + | |
| 385 | + | |
298 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
299 | 394 | | |
300 | 395 | | |
301 | 396 | | |
| |||
311 | 406 | | |
312 | 407 | | |
313 | 408 | | |
| 409 | + | |
| 410 | + | |
314 | 411 | | |
315 | 412 | | |
316 | 413 | | |
| |||
336 | 433 | | |
337 | 434 | | |
338 | 435 | | |
339 | | - | |
| 436 | + | |
340 | 437 | | |
341 | 438 | | |
342 | | - | |
| 439 | + | |
343 | 440 | | |
344 | 441 | | |
345 | 442 | | |
| |||
361 | 458 | | |
362 | 459 | | |
363 | 460 | | |
364 | | - | |
365 | | - | |
366 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
367 | 464 | | |
368 | 465 | | |
369 | | - | |
370 | | - | |
| 466 | + | |
| 467 | + | |
371 | 468 | | |
372 | 469 | | |
373 | | - | |
| 470 | + | |
374 | 471 | | |
375 | | - | |
| 472 | + | |
376 | 473 | | |
377 | 474 | | |
378 | 475 | | |
379 | | - | |
| 476 | + | |
380 | 477 | | |
381 | | - | |
| 478 | + | |
382 | 479 | | |
383 | 480 | | |
384 | | - | |
| 481 | + | |
385 | 482 | | |
386 | 483 | | |
387 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
591 | 609 | | |
592 | 610 | | |
593 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
0 commit comments