torch.profiler.Profiler.key_averages
Profiler.key_averages(): KinetoStepReturns aggregated statistics grouped by operation name.
Returns
KinetoStep– KinetoStep containing aggregated profiling statisticsExamples
const profiler = await profile(async () => {
for (let i = 0; i < 10; i++) {
torch.randn([100, 100]).sum();
}
});
const stats = profiler.key_averages();
console.log(stats.table({ row_limit: 10 }));