[Mlir-commits] [mlir] 2642240 - [mlir] Add explicit call to flush

Adrian Kuegel llvmlistbot at llvm.org
Mon Jan 8 00:04:28 PST 2024


Author: Adrian Kuegel
Date: 2024-01-08T08:04:13Z
New Revision: 2642240de9b9004a431f4e601c055c8c135c9d39

URL: https://github.com/llvm/llvm-project/commit/2642240de9b9004a431f4e601c055c8c135c9d39
DIFF: https://github.com/llvm/llvm-project/commit/2642240de9b9004a431f4e601c055c8c135c9d39.diff

LOG: [mlir] Add explicit call to flush

ClangTidy performance suggested to use '\n' instead of std::endl, but it
seems the flushing behavior was intended here (tests started failing).

Added: 
    

Modified: 
    mlir/include/mlir/ExecutionEngine/RunnerUtils.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
index 72001172c426ed..ebf95f90f37450 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -224,7 +224,7 @@ void printMemRef(const DynamicMemRefType<T> &m) {
                               m.sizes, m.strides);
   if (m.rank == 0)
     std::cout << "]";
-  std::cout << '\n';
+  std::cout << '\n' << std::flush;
 }
 
 template <typename T, int N>


        


More information about the Mlir-commits mailing list