Overview

This page provides an explanation and solutions for the following cuptiGetLastError() code when using the NVIDIA CUPTI libary API:
   CUPTI_ERROR_INSUFFICIENT_PRIVILEGES
For general information about this error including Solutions and Administration, please see NVIDIA Development Tools Solutions - ERR_NVGPUCTRPERM: Permission issue with Performance Counters.

Solutions for this issue

To get the desired behavior (see chart below) when profiling,
  1. Have a system administrator enable access to the NVIDIA performance counters using the Administration instructions
  2. Run the application being profiled with administrative privileges
  • On Windows targets: Launch the target application by right-clicking on the application and selecting "Run as administrator"
  • On Linux targets: Launch the target application with 'sudo' or as a user with the CAP_SYS_ADMIN capability set

Behavior

For the NVIDIA CUPTI libary API found in the CUDA Toolkit version 10.2

Mode[1] User[2] Expected Behavior
Restricted Profiling Admin[3] cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
Restricted Profiling non-Admin For profiling APIs,
cuptiGetLastError() returns CUPTI_ERROR_INSUFFICIENT_PRIVILEGES
and no profiling is possible.

For tracing APIs,
cuptiGetLastError() returns CUPTI_SUCCESS
and tracing APIs produce normal results.
Unrestricted Profiling Admin[3] cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
Unrestricted Profiling non-Admin cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
[1] Mode set by system administrator using the Administration instructions
[2] Privilege level of user running target application being profiled on target device
[3] Admin user privilege achieved by
  • On Windows targets: Launching the target application by right-clicking on the application and selecting "Run as administrator
  • On Linux targets: Launching the target application with 'sudo' or as a user with the CAP_SYS_ADMIN capability set
For the NVIDIA CUPTI libary API found in the CUDA Toolkit version 10.1

Mode[1] User[2] Expected Behavior
Restricted Profiling Admin[3] cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
Restricted Profiling non-Admin cuptiGetLastError() returns CUPTI_ERROR_INSUFFICIENT_PRIVILEGES
and no profiling or tracing is possible.
Unrestricted Profiling Admin[3] cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
Unrestricted Profiling non-Admin cuptiGetLastError() returns CUPTI_SUCCESS (assuming no other error)
and profiling/tracing APIs produce normal results
[1] Mode set by system administrator using the Administration instructions
[2] Privilege level of user running target application being profiled on target device
[3] Admin user privilege achieved by
  • On Windows targets: Launching the target application by right-clicking on the application and selecting "Run as administrator
  • On Linux targets: Launching the target application with 'sudo' or as a user with the CAP_SYS_ADMIN capability set