[Ptools-perfapi] PAPI_read not accumulating in CUDA component?

Heike Jagode jagode at eecs.utk.edu
Mon Oct 31 19:24:22 EDT 2011


Harald,

that's correct, the CUPTI functions cuptiEventGroupReadAllEvents and
cuptiEventGroupReadEvent always reset to 0. If we want to accumulate
we need to do it ourselves. I'll have a look at the CUDA component and
add a fix.
Also, this will be documented in the CUDA 4.1 user guide. The EA
documentation has already been fixed/updated.

Thanks,
heike.


On Wed, Oct 26, 2011 at 10:21 AM, Harald Servat <harald.servat at bsc.es> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
>  I've noticed that PAPI_read on the CUDA component seems to be invoking
> PAPI_reset after every call (opposite on what typically happens in PAPI
> counting CPU metrics). After using an example distributed with the CUPTI
> sofware, I guess it's because of the CUPTI calls.
>
>  This behavior (i.e., the fact about resetting hwc) is undocumented
> according to CUPTI User's Guide (pages 44 and 45, for routines
> cuptiEventGroupReadAllEvents and cuptiEventGroupReadEvent), but I can
> observe it using the "event_sampling" [1] example distributed with the
> CUPTI software. The mentioned example samples the instructions executed
> in the CUDA device, and every read using cuptiEventGroupReadEvent
> returns a non increasing value (and consistent according to the sampling
> period).
>
>  I guess that if we wanted the same behavior in CUDA and CPU, we should
> have to add the values getEventValue or in CUDA_read from the
> linux-cuda.c file. For this particular case, that would do the trick.
> But looking beyond that, what about other components? it is possible
> that they cannot (or do not) accumulate counters from the last
> PAPI_start/PAPI_reset.
>
> Regards and sorry for the inconvenience/noise when you're about to
> launch PAPI 4.2.
>
> [1] Note that if you want to calculate *all* the instructions executed
> in the kernel you need to add an extra "read of counters" after loop
> contained in lines 88-106.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.15 (GNU/Linux)
>
> iEYEARECAAYFAk6oF3wACgkQwMPeuqUCg9ywxwCfR1nHtbYbuAlymI1jANDipq7+
> NdcAmwUvACuOMipcaf6agExGvFI2fNp2
> =5R3a
> -----END PGP SIGNATURE-----
>
> WARNING / LEGAL TEXT: This message is intended only for the use of the
> individual or entity to which it is addressed and may contain
> information which is privileged, confidential, proprietary, or exempt
> from disclosure under applicable law. If you are not the intended
> recipient or the person responsible for delivering the message to the
> intended recipient, you are strictly prohibited from disclosing,
> distributing, copying, or in any way using this message. If you have
> received this communication in error, please notify the sender and
> destroy and delete any copies you may have received.
>
> http://www.bsc.es/disclaimer.htm
> _______________________________________________
> Ptools-perfapi mailing list
> Ptools-perfapi at eecs.utk.edu
> http://lists.eecs.utk.edu/mailman/listinfo/ptools-perfapi
>



-- 
___________________________________
Heike Jagode
Innovative Computing Laboratory (ICL)
University of Tennessee, Knoxville (UTK)
e-mail:   jagode at eecs.utk.edu
phone:   +1 865 974 8057
fax:        +1 865 974 8296


More information about the Ptools-perfapi mailing list