我正在关注此处的教程,以获取Performance Application Programming Interface的 python 包装器。
我可以看到papi_avail
我的系统确实有硬件计数器 ( Number Hardware Counters: 11
) 并且我感兴趣的事件 ( PAPI_SP_OPS
) 可用:
Name Code Avail Deriv Description (Note)
PAPI_SP_OPS 0x80000067 Yes Yes Floating point operations; optimised to count scaled single precision vector operations
现在我运行类似于教程中所示的 python 包装器:
from pyapi import events, papi_high as high
high.start_counters([events.PAPI_SP_OPS])
但是我得到了错误pyapi.exceptions.PapiNoEventError: Event does not exist. (PAPI_ENOEVNT)
。但显然事件确实存在,如开头所示papi_avail
有小费吗?