Open philipportner opened 1 month ago
All of the above was measure by running bin/daphne --timing --statistics --enable-profiling test/api/cli/algorithms/decisionTreeRealData2.daphne data=\"test/data/wine/winequality-red-white.csv\" dt=1 maxV=1.000000
.
The mlir::PassManager
output was manually added:
diff --git a/src/compiler/execution/DaphneIrExecutor.cpp b/src/compiler/execution/DaphneIrExecutor.cpp
index b994a3fc..49c683e6 100644
--- a/src/compiler/execution/DaphneIrExecutor.cpp
+++ b/src/compiler/execution/DaphneIrExecutor.cpp
@@ -221,6 +221,7 @@ bool DaphneIrExecutor::runPasses(mlir::ModuleOp module) {
+ pm.enableTiming();
Some related issues: #206, #423 , #424
The current state of DAPHNE compilation and execution "feedback" flags is a bit convoluted. I feel like we should decide on what actually is useful output, and which commands we want to keep / merge / remove / improve. Obviously, some may sound similar but provide completely different output, e.g.,
--statistics
and--enable-profiling
. I'm not arguing to remove all but one but to make it clearer and start an effort to improve usability and the functionality itself. The following exist:--timing
Adds high-level stats about startup, compilation, and execution time.Use case: Provides the user with an high-level overview of time spent.
Example output:
--statistics
Enables kernel dispatch and script operator level runtime profiling.Use case: The user wants to know how long each operator in the script took and what were the heavy hitters that one may want to optimize first.
Example output:
--enable-profiling
PAPI based profiling, currently only with regions starting and ending at the
func::FuncOp
scope.Use case: Possible to get lots of interesting metrics, usefulness is somewhat limited because each
PAPI_REGION
is only inserted atfunc::FuncOp
scope which makes it hard to profile specific operations. Astart/stopProfiling()
built-in is in the works and helps with that but is not directly linked with the CLI flag.Example output:
mlir::PassManager::enableTiming()
Coming with #739, default timing functionality from MLIR for the compilation pipeline (PassManager
).Use case: Provides a report of time spent in the compilation pipeline. Helpful when introducing complex optimization passes to monitor time/overhead spent during the passes.
Example output: