"Please ensure there are no enqueued operations pending in this context prior to switching profiles" warning

Hi there,

I always get this warning message:

<WARN> Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles

when _context->setOptimizationProfile(0); gets called. Is there anything I can do to avoid this warning? If not, shouldn’t this be demoted to INFO?

“Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles”

o Linux distro and version: Debian 9
o GPU type: RTX 2080 TI
o Nvidia driver version: 410.93
o CUDA version: 10.0
o CUDNN version: 7.6.3
o Python version [if using python]: Using c++
o Tensorflow and PyTorch version
o TensorRT version: 7.0.0.11

Thanks in advance for your help!

Hi,

This is just a warning message that get displayed when any optimization profile is used during TRT model generation so that user can make sure no enqueued operations are pending in current context.

You can set the logger severity to “kERROR” to avoid getting such warning messages.

Thanks

Thanks for the quick answer.

Sure, your solution works fine but then I loose messages that might actually be important warnings. I don’t want to mute all warnings.

The question is that this message should probably be INFO and not WARN.

In NvInferRuntimeCommon.h nvidia says:

kWARNING = 2,        //!< An application error has been discovered, but TensorRT has recovered or fallen back to a default.
kINFO = 3,           //!< Informational messages with instructional information.

I would consider this warning a “Informational messages with instructional information” and not a “An application error has been discovered, but TensorRT has recovered or fallen back to a default”

Thanks

1 Like

Filled a bug report: https://developer.nvidia.com/nvidia_bug/2825934

1 Like