Measuring double-precision operations with DP_OPS event

219 views
Skip to first unread message

Fotis Drakopoulos

unread,
Apr 23, 2021, 10:07:32 AM4/23/21
to ptools-...@icl.utk.edu
Dear,

I'm trying to use the PAPI software to measure the operations of a neural-network model in python using a python wrapper (pypapi). I'm using the event PAPI_DP_OPS (since the PAPI_FP_OPS event is not available on my CPU) and, when I'm counting an iteration of the neural-network model using the PAPI_DP_OPS event, I get around 390 FLOPS as output. This number seems rather low for the operations of a neural-network model, so I was wondering whether the PAPI_DP_OPS event returns the total count of DP_OPS or maybe the MFLOPS/s (or something like that) that justifies this low number?

Thank you in advance!

Best regards,
Fotis

Anthony Danalis

unread,
Apr 23, 2021, 10:23:29 AM4/23/21
to Fotis Drakopoulos, ptools-perfapi
Foti, PAPI_DP_OPS should return a count, not a rate. A way to verify
this on your machine would be to run:
papi_avail -e PAPI_DP_OPS
which will show you information about the event, and specifically the
native event(s) used to derive it.

Why do you expect the model to have multiple double precision floating
point operations? Typically, NN codes do not use many DP float
operations.

Regards,
Anthony
> --
> You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
> To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/CAGbUg2%3D7D1tYQBNSgpsQQ22hnRjRgbi4n3UcVr_w7Nf-H9VAXA%40mail.gmail.com.

Fotis Drakopoulos

unread,
Apr 23, 2021, 10:58:50 AM4/23/21
to Anthony Danalis, ptools-perfapi
Hi Anthony,

Thanks for the answer, that's what I expected as well. My assumption was
that the NN model that I evaluated required a large amount of FLOPS, but
when I run the PAPI_SP_OPS I get 0 operations and ~390 for the
PAPI_DP_OPS. The reported values that I normally see for FLOPS for such
NN models are in the order of GFLOPS, are these reported operations
different than the DP_OPS that I get from papi?

Regards,

Fotis

Muhammet Balcilar

unread,
Jun 27, 2022, 8:57:14 PM6/27/22
to ptools-perfapi, Fotis Drakopoulos, ptools-perfapi, adanalis
Probably you use GPU. PAPI daes not count GPU operations. Use just cpu and count  PAPI_SP_OPS 

Anthony Danalis

unread,
Jun 28, 2022, 9:55:25 AM6/28/22
to Muhammet Balcilar, ptools-perfapi, Fotis Drakopoulos
This statement is false. PAPI can count GPU operations on GPUs from
all three vendors (NVIDIA, AMD, and Intel). However, not by using the
event PAPI_SP_OPS. For GPU events to be counted the PAPI user has to
configure in the corresponding component and use the corresponding
native events, which can be found using the utility papi_native_avail.

thanks,
Anthony
Reply all
Reply to author
Forward
0 new messages