You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collect metrics for miscellaneous IREE system states #6161
Pass statistics (sample output) can be extracted with
# build with CMake in Debug or RelWithDebInfo + `-DLLVM_FORCE_ENABLE_STATS=ON`
iree-translate \
${MODEL_PATH} (flags like -iree-input-type=mhlo) \
-pass-statistics \
-o /dev/null \
2>${MODEL}_statistics.txt
# Extract number of dispatches after FusionOfTensorOps + DispatchLinalgOnTensors
cat ${MODEL}_statistics.txt | grep "number of dispatches"| sed -E 's/.* ([0-9]+) number.*/\1/'# Extract number of unique executables after DeduplicateExecutables
cat ${MODEL}_statistics.txt | grep "unique executable"| sed -E 's/.* ([0-9]+) unique.*/\1/'
For bert_encoder_unrolled_fake_weights.mlir there are currently 969 dispatches and 28 unique executables. The number of dispatches is a useful codegen metric tracking how much code is getting fused, and tracking that would make regressions like #6648 easier to spot.
We can add more statistics with #1409. Number of host round trips will be useful for flow->streams->hal.
#6868 added the --print_statistics flag for iree-run-module, with output like
The benchmark tools can now collect memory usages (#13325), compilation time, dispatch sizes, and will include the numbers of dispatches soon. I think in general we have a schema to collect multiple metrics, so we can close this one. (And for sure more metrics will be added later).
Activity
antiagainst commentedon Jun 9, 2021
Some initial candidates to be refined:
Also initial thoughts from @ScottTodd:
ScottTodd commentedon Sep 3, 2021
Pass statistics (sample output) can be extracted with
For bert_encoder_unrolled_fake_weights.mlir there are currently 969 dispatches and 28 unique executables. The number of dispatches is a useful codegen metric tracking how much code is getting fused, and tracking that would make regressions like #6648 easier to spot.
We can add more statistics with #1409. Number of host round trips will be useful for flow->streams->hal.
#6868 added the
--print_statisticsflag foriree-run-module, with output likewhich will give an accurate report for memory usage even for models with dynamic behavior.
Add statistics to Util/Transforms/FoldGlobals.cpp. (#7535)
allieculp commentedon Apr 10, 2023
Sending to backlog due to the date of the issue - please reprioritize if needed.
ScottTodd commentedon Apr 10, 2023
Is there anything still to do here, or can that be tracked in other issues? We are measuring some metrics (but more would be nice).
pzread commentedon May 8, 2023
The benchmark tools can now collect memory usages (#13325), compilation time, dispatch sizes, and will include the numbers of dispatches soon. I think in general we have a schema to collect multiple metrics, so we can close this one. (And for sure more metrics will be added later).