Welcome to PyPAPI’s documentation!
PyPAPI is a Python binding for the PAPI (Performance Application Programming Interface) library. PyPAPI implements the whole PAPI High Level API and partially the Low Level API.
Example usage:
# High Level API
from pypapi import papi_high
papi_high.hl_region_begin("computation")
# computation
papi_high.hl_region_end("computation")
# Low Level API
from pypapi import papi_low as papi
from pypapi import events
papi.library_init()
evs = papi.create_eventset()
papi.add_event(evs, events.PAPI_FP_OPS)
papi.start(evs)
# Do some computation here
result = papi.stop(evs)
print(result)
papi.cleanup_eventset(evs)
papi.destroy_eventset(evs)
- Installing PyPAPI
- PAPI High Level API
- PAPI Low Level API
accum()
add_event()
add_events()
add_named_event()
assign_eventset_component()
attach()
cleanup_eventset()
create_eventset()
destroy_eventset()
detach()
disable_component()
disable_component_by_name()
enum_cmp_event()
enum_event()
epc()
event_code_to_name()
event_name_to_code()
flips_rate()
flops_rate()
get_component_index()
get_component_info()
get_dmem_info()
get_event_component()
get_event_info()
get_eventset_component()
get_executable_info()
get_hardware_info()
get_real_cyc()
get_real_nsec()
get_real_usec()
get_shared_lib_info()
get_virt_cyc()
get_virt_nsec()
get_virt_usec()
ipc()
is_initialized()
library_init()
list_events()
list_threads()
lock()
multiplex_init()
num_cmp_hwctrs()
num_components()
num_events()
perror()
query_event()
query_named_event()
rate_stop()
read()
register_thread()
remove_event()
remove_events()
remove_named_event()
reset()
set_cmp_domain()
set_cmp_granularity()
set_debug()
set_domain()
set_granularity()
set_multiplex()
set_opt()
shutdown()
start()
state()
stop()
strerror()
thread_id()
unlock()
unregister_thread()
write()
- PAPI Structs
- Events
- Constants
- Exceptions
PapiAttributeError
PapiBufferError
PapiBugError
PapiCombinationError
PapiComponentError
PapiConflictError
PapiCountError
PapiCountersLost
PapiError
PapiInitializationError
PapiInvalidDomainError
PapiInvalidValueError
PapiIsRunningError
PapiMiscellaneousError
PapiNoComponentError
PapiNoCounterError
PapiNoEventError
PapiNoEventSetError
PapiNoMemoryError
PapiNotImplementedError
PapiNotPresetError
PapiNotRunningError
PapiNotSupportedError
PapiPermissionError
PapiSystemError
papi_error()
- Licenses