The patch extends the runner utils by verification methods that compare two memrefs. The methods compare the content of the two memrefs and print success if the data is identical up to a small numerical error. The methods are meant to simplify the development of integration tests that for example compare optimized and unoptimized code paths (cf. the updates to the linalg matmul integration tests).
Details
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
70 ms | x64 windows > Clang.SemaObjC::warn-called-once.m |
Event Timeline
Thanks for adding this @gysit !
Can you please also address the lints?
mlir/include/mlir/ExecutionEngine/RunnerUtils.h | ||
---|---|---|
294 | We should probably avoid printing to stdout in general. | |
mlir/integration_test/Dialect/Linalg/CPU/benchmark_matmul.mlir | ||
61 | Can we move this closer to its uses and "scope it" more tightly? alloc fill run test print dealloc | |
98 | let's please make this return an i8 that we just vector.print and //CHECK: 0 |
Avoid std::cout and return number of errors instead of printing success or failure. Restructured the unit tests to limit the scope of the verification code. Also tried to address the lint issues. Howerever the _mlir_ciface_ perfix is fix as far as I understand.
@nicolasvasilache the updated revision should address your comments. The linter may not be happy with the function naming (_mlir_ciface) and I somewhat prefer the older function names.
Could you please add #include<algorithm> for RunnerUtils.h? MSVC requires it for std::max/min, resulting in this http://lab.llvm.org:8011/#/builders/13/builds/4283/steps/6/logs/stdio failure. Thanks!
To be clear, the windows mlir buildbot is broken because of this change:
http://lab.llvm.org:8011/#/builders/13/builds/4284
Perhaps you are not getting the notifications?
clang-tidy: warning: invalid case style for parameter 'M1' [readability-identifier-naming]
not useful