Skip to content

Commit 7ae4abf

Browse files
committed
Address PR review comments for layout mapping
Replace hardcoded ROCMLIR_TO_MIOPEN_LAYOUT dict with algorithmic best-effort conversion: normalize spatial dims (0->H, 1->W), drop group dim (G), then classify by innermost dimension (channel-first -> NCHW, channel-last -> NHWC). - Add "best effort mapping" disclaimer (umangyadav) - Warn on group convolutions G>1 where dropping G is lossy (dhernandez0) - Handle K defensively in heuristic (dhernandez0) - Warn on unrecognised layouts instead of silent passthrough (cursor) - Run yapf formatting Made-with: Cursor
1 parent ceb8c23 commit 7ae4abf

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

mlir/utils/performance/perfRunner.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,9 @@ def benchmark_external(cls, commandline, paths: Paths, arch, num_cu, num_chiplet
765765
# "Elapsed: " (note the space at the end) and "ms"
766766
match = ELAPSED_TIME_RE.search(outs)
767767
if not match:
768-
raise RuntimeError(
769-
"Failed to parse elapsed time from MIOpenDriver output.\n"
770-
"Failing command: " + ' '.join(miopen_driver_cmd) + "\n"
771-
"Output:\n" + outs
772-
)
768+
raise RuntimeError("Failed to parse elapsed time from MIOpenDriver output.\n"
769+
"Failing command: " + ' '.join(miopen_driver_cmd) + "\n"
770+
"Output:\n" + outs)
773771
elapsed_time_in_ms = match.group(1)
774772
nanoseconds = float(elapsed_time_in_ms) * 1.0e6
775773
return config.table_entry(nanoseconds)

0 commit comments

Comments
 (0)