Commit Graph

5 Commits

Author SHA1 Message Date
Tristan Konolige 9d6599c928 [PROFILER] Add configuration information to profiler (#11530)
Configuration is a place to store extra information related to the
specific profiler run. Right now it is just the executor used and the
number of threads. The roofline analysis also adds peak flops and peak
bandwidth.
2022-06-06 08:49:22 -07:00
Tristan Konolige aff1312e36 [PROFILER] Fix percent compute bound calculation (#11542)
* [PROFILER] Fix percent compute bound calculation

Somehow the runtime was dropped from the percent compute bound
calculation. Tolerances on the test we bumped a little bit higher to try
and catch mistakes like this in the future.

* forgot print
2022-06-02 14:37:11 -07:00
Tristan Konolige be65732b2a [ROOFLINE] Roofline analysis over RPC (#11252)
* [ROOFLINE] Roofline analysis over RPC

Run roofline analysis on remote devices if requested. Peak flops and
peak bandwidth estimation are done on the remote device.

* allocate testing arrays directly on device and randomly fill

* forgot to include remote

* lower flops ratio, machine may be using multiple threads

* forgot fill
2022-05-13 14:09:14 -07:00
Tristan Konolige d2a7f93beb [ROOFLINE] Calculate roofline from existing TIR PrimFunc (#11238)
Refactor roofline_analysis to use a pass instrument to save TIR code
from compilation for feature extraction. This should support different
compilation pipelines and avoids recompiling the module twice.
2022-05-09 14:45:09 -07:00
Tristan Konolige 90084ab8db [PROFILER] Theoretical roofline models (#11066)
`tvm.analysis.roofline_analysis` adds estimated roofline performance to a
profiling report. The roofline model measures how close an operator gets
to best possible memory bandwidth or FLOP/s depending on whether it is
memory or compute bound. This computation uses the runtime of the
operator along with two numbers extracted from the TIR code: bytes of
memory touched and number of floating point operations. Because these
numbers are extracted from TIR, they may not be 100% accurate. The best
possible memory bandwidth and FLOP/s are measured by running small
programs that are memory and compute bound respectively.

For now, this function only works with llvm cpu targets, but it should
be possible to extend to GPU targets.
2022-05-03 14:54:38 -07:00