Machine learning applications are very compute intensive by their nature. That is why optimization for performance is quite important for them. One of the most popular libraries, Tensorflow*, already has an embedded timeline feature that helps understand which parts of the computational graph are causing bottlenecks but it lacks some advanced features like an architectural analysis.
The TSX Hotspots analysis type uses event-based sampling collection and is targeted for the Intel® processors supporting Intel Transactional Synchronization Extensions (Intel TSX).
This analysis type uses the the INST_RETIRED.PREC_DIST hardware event that emulates precise clockticks and helps identify performance-critical program units inside transactions.
To use the TSX Hotspots analysis type, explore: