[Mlir-commits] [mlir] [mlir] Enhance TimingManager Printing Flexibility (PR #85821)

Jeff Niu llvmlistbot at llvm.org
Wed Mar 20 10:58:23 PDT 2024


================
@@ -351,6 +351,15 @@ class DefaultTimingManager : public TimingManager {
     Tree,
   };
 
+  /// The different output formats for printing the timers.
+  enum class OutputFormat {
----------------
Mogball wrote:

This enum seems like a poor basis for extensibility. It seems to me a more powerful API would be to directly expose the `OutputStrategy` abstract class and allow users to inject their own `std::unique_ptr<OutputStrategy>` implementation. We can ship Text and Json as "batteries" for it.

https://github.com/llvm/llvm-project/pull/85821


More information about the Mlir-commits mailing list