Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is no change in the inference APIs, except for the need to set the MXNET_USE_TENSORRT environment variable to 1. For example, in Python, we can simply do:

Wiki Markupcode
{os.environ["MXNET_USE_TENSORRT"] = “1”}


Note that for backward compatibility, if the environment variable is not set, it will default to 0. Also, unlike some other environment variables that are only checked during MxNet initialization, this one gets checked every time graph binding happens. This typically happens only once during the inference application’s life cycle, but since one can re-bind a symbol to say compare a TensorRT and a non-TensorRT run, the check will happen during each bind/re-bind to enable that. Since the TensorRT graph pass is enabled using an environment variable, no break in the C++, C or any frontend language API is needed.

...