Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorRT Segmentation Fault #17527

Closed
vmazalov opened this issue Sep 12, 2023 · 1 comment
Closed

TensorRT Segmentation Fault #17527

vmazalov opened this issue Sep 12, 2023 · 1 comment
Assignees
Labels
ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider

Comments

@vmazalov
Copy link

Describe the issue

This code throws Segmentation Fault. Is there a recommended way to investigate?

CheckStatus(m_ort->SessionOptionsAppendExecutionProvider_TensorRT(m_sessionOptions, &trtOptions));

To reproduce

m_ort = OrtGetApiBase()->GetApi(14);
CheckStatus(m_ort->CreateSessionOptions(&m_sessionOptions));
CheckStatus(m_ort->SetIntraOpNumThreads(m_sessionOptions, 1));
CheckStatus(m_ort->SetSessionGraphOptimizationLevel(m_sessionOptions, sessionSetting.m_bDisableOptimizations ? ORT_ENABLE_BASIC : ORT_ENABLE_ALL));
int logSeverityLevel = 3;
CheckStatus(m_ort->SetSessionLogSeverityLevel(m_sessionOptions, logSeverityLevel));
CheckStatus(m_ort->DisableMemPattern(m_sessionOptions));
OrtTensorRTProviderOptions trtOptions;
CheckStatus(m_ort->SessionOptionsAppendExecutionProvider_TensorRT(m_sessionOptions, &trtOptions)); // This line is causing segmentation fault

Urgency

No response

Platform

Linux

OS Version

Ubuntu 20.04.6 LTS

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.15.1

ONNX Runtime API

C++

Architecture

X64

Execution Provider

TensorRT

Execution Provider Library Version

https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz

@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider labels Sep 12, 2023
@vmazalov
Copy link
Author

This was fixed by using the _V2 TRT binding and most importantly ensuring that LD_LIBRARY_PATH includes the TRT path /usr/lib/TensorRT-8.6.1.6/targets/x86_64-linux-gnu/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider
Projects
None yet
Development

No branches or pull requests

2 participants