Skip to content

TensorRTExecutionProvider: Attempt to use DefaultLogger but none has been registered #236

@zopieux

Description

@zopieux

It looks like the default setup for TensorRTExecutionProvider is not working as of latest release candidate. This seems to be a compile-time issue, a default logger is not registered at init time. This doesn't seem like something I can influence as ort library user.

Failed to register TensorRT!
Err(ExecutionProvider(Msg("/home/runner/work/ort-artifacts-staging/ort-artifacts-staging/onnxruntime/include/onnxruntime/core/common/logging/logging.h:320
static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger()
Attempt to use DefaultLogger but none has been registered.\n")))

https://www.sidefx.com/docs/hdk/onnxruntime_2core_2common_2logging_2logging_8h_source.html

// main.rs
let builder = Session::builder()?;
let tensorrt = TensorRTExecutionProvider::default();
let reg = tensorrt.register(&builder);
if reg.is_err() {
  eprintln!("Failed to register TensorRT! {reg:?}");
  std::process::exit(1);
}

Ran in Docker image nvcr.io/nvidia/tensorrt:24.06-py3 which should provide all the necessary libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions