Skip to content

c#, dotnet 6.0, Attempt to use DefaultLogger but none has been registered. #15179

Closed
@xlg-go

Description

@xlg-go

Describe the issue

NVIDIA Quadro P6000, 24GB,
c#, dotnet6.0, webapi,
tensorRT provider,

When I execute this code, I get an error!

this code:
sOp.AppendExecutionProvider_Tensorrt(deviceId: 0);

this error:
onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered.

To reproduce

var sOp = new SessionOptions
{
    IntraOpNumThreads = 1,
    GraphOptimizationLevel = GraphOptimizationLevel.ORT_ENABLE_BASIC,
};
sOp.AppendExecutionProvider_Tensorrt(deviceId: 0);   // i am here    
var session = new InferenceSession(modelFile, sOp);

image

terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
  what():  /onnxruntime_src/include/onnxruntime/core/common/logging/logging.h:294 static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered.

image

linux-vdso.so.1 (0x00007fff37bde000)
libcudnn.so.8 => /lib/x86_64-linux-gnu/libcudnn.so.8 (0x00007fed705de000)
libcublas.so.11 => /usr/local/cuda/targets/x86_64-linux/lib/libcublas.so.11 (0x00007fed66e60000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed66e5a000)
libcudart.so.11.0 => /usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.11.0 (0x00007fed66bb6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fed66b9a000)
libnvinfer.so.8 => /lib/x86_64-linux-gnu/libnvinfer.so.8 (0x00007fed49353000)
libnvinfer_plugin.so.8 => /lib/x86_64-linux-gnu/libnvinfer_plugin.so.8 (0x00007fed463b9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed46396000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fed4638c000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed461aa000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed4605b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed46040000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed45e4c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fed70acb000)
libcublasLt.so.11 => /usr/local/cuda/targets/x86_64-linux/lib/libcublasLt.so.11 (0x00007fed30de6000)

Urgency

No response

Platform

Linux

OS Version

ubuntu 20.04

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

Microsoft.ML.OnnxRuntime.Gpu 1.14.1

ONNX Runtime API

C#

Architecture

X64

Execution Provider

TensorRT

Execution Provider Library Version

TRT 8.5.3, cuDNN 8.5.0.96, cuda 11.6.2

Model File

image

Is this a quantized model?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:CUDAissues related to the CUDA execution providerep:TensorRTissues related to TensorRT execution provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions