Includes Python bindings to instrumentation and tracing technology (ITT) APIs for VTune.
Intel VTune Amplifier works great on Python code. This package exposes some limited features of the ITT API in Python to help focus analysis. Right now it only has the collection and control API and some of the user task API.
import itt
# ... uninteresting code
itt.resume()
# ... very interesting code
itt.pause()
# ... boring stuff again
itt.resume()
# ... interesting code
itt.detach()
# ... uninteresting code like writing output (sheesh)
Here one would actually run
> amplxe-cl -start-paused ... python script.py ...
So execution begins with collection paused and only the interesting code is profiled.
import itt
# ...
domain = itt.domain_create("domain")
itt.task_begin(domain, "awesome")
# ... do the awesome ...
itt.task_end(domain)
To get the user task labels into your VTune timeline you need to add enable-user-task
knob
> amplxe-cl -collect hotspots -knob enable-user-tasks ... python script.py
Provide the build_ext
step with the path to the root VTune install directory.
For instance,
python setup.py build_ext --vtune=$VTUNE_AMPLIFIER_XE_2018_DIR
python setup.py install
The build assumes:
$VTUNE_AMPLIFIER_XE_2018_DIR/include
$VTUNE_AMPLIFIER_XE_2018_DIR/lib64/libittnotify.a
Run without collecting data. Reduces overhead from collection.
Resume data collection.
Detaches all collectors from all processes. Application continues to work but no data is collected for the running collection.
Create domain with the given name name
.
URI naming style is recommended.
No mechanism to destroy domain (expected to be static over execution).
Returns a domain, which is just a Capsule.
Create task instance on a thread called name
.
Becomes current task instance for that thread.
Call task_end()
on same thread to end current task instance.
Not implemented.
End a task instance on a thread.
- Intel Developer Zone page on the ITT Collection Control API
- Performance Analysis of Python with Intel VTune Amplifier
- Intel Distribution for Python
- ITT Task API Reference
- Sergey Maidanov and Vasilij Litvinov at Intel
- Brian Friesen and Brandon Cook at NERSC