Skip to main content
`Ctrl`+`K`

# PetscLogGpuTime

turn on the logging of GPU time for GPU kernels

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogGpuTime(void)

## Options Database Key

- -log_view_gpu_time - provide the GPU times for all events in the `-log_view` output

## Notes

Turning on the timing of the GPU kernels can slow down the entire computation and should only be used when studying the performance of individual operations on GPU such as vector operations and matrix-vector operations.

If this option is not used then times for most of the events in the `-log_view` output will be listed as Nan, indicating the times are not available

This routine should only be called once near the beginning of the program. Once it is started it cannot be turned off.

## See Also

Profiling, `PetscLogView()`, `PetscLogGpuFlops()`, `PetscLogGpuTimeEnd()`, `PetscLogGpuTimeBegin()`

## Level

advanced

## Location

src/sys/logging/plog.c

Index of all Log routines
Table of Contents for all manual pages
Index of all manual pages