You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
trtexec fails at the end if --saveEngine path is invalid or unwritable #4448
When running trtexec with the --saveEngine flag pointing to an invalid or unwritable path, the tool proceeds to parse the ONNX model and build the engine. However, it only fails at the very end when attempting to serialize the engine, wasting time and resources.
This issue is created to introduce the following pull request: #4449
Environment
This issue should occur regardless of the system configuration.
changed the title [-]XXX failure of TensorRT X.Y when running XXX on GPU XXX[/-][+] [WIP] XXX failure of TensorRT X.Y when running XXX on GPU XXX[/+]on May 18, 2025
changed the title [-] [WIP] XXX failure of TensorRT X.Y when running XXX on GPU XXX[/-][+]```trtexec``` fails at the end if --saveEngine path is invalid or unwritable[/+]on May 19, 2025
changed the title [-]```trtexec``` fails at the end if --saveEngine path is invalid or unwritable[/-][+]```trtexec``` fails at the end if ```--saveEngine``` path is invalid or unwritable[/+]on May 19, 2025
I've also submitted an implementation for this: #4675
My approach validates the --saveEngine path immediately after parsing by checking parent directory existence and testing write permissions via a temporary file. Happy to defer to #4449 if maintainers prefer that implementation, or collaborate on merging the best aspects of both.
You're right - I reviewed both implementations and they are essentially the same approach (checking parent directory existence + testing write permissions via temp file).
Since your PR #4449 was submitted first, I'm happy to close mine and defer to yours. No need to duplicate effort!
Activity
[-]XXX failure of TensorRT X.Y when running XXX on GPU XXX[/-][+] [WIP] XXX failure of TensorRT X.Y when running XXX on GPU XXX[/+]NVIDIA#4448 - Fail early if engine file path is unwritable before ONN…
[-] [WIP] XXX failure of TensorRT X.Y when running XXX on GPU XXX[/-][+]```trtexec``` fails at the end if --saveEngine path is invalid or unwritable[/+][-]```trtexec``` fails at the end if --saveEngine path is invalid or unwritable[/-][+]```trtexec``` fails at the end if ```--saveEngine``` path is invalid or unwritable[/+]NVIDIA#4448 - Fail early if engine file path is unwritable before ONN…
NVIDIA#4448 - Fail early if engine file path is unwritable before ONN…
NVIDIA#4448 - Fail early if engine file path is unwritable before ONN…
NVIDIA#4448 - Validate --saveEngine path before engine build
AditiThirdEye commentedon Dec 28, 2025
I've also submitted an implementation for this: #4675
My approach validates the --saveEngine path immediately after parsing by checking parent directory existence and testing write permissions via a temporary file. Happy to defer to #4449 if maintainers prefer that implementation, or collaborate on merging the best aspects of both.
PierreMarieCurie commentedon Jan 1, 2026
Hello @AditiThirdEye ,
From what I can see, both implementations are functionally identical. Please let me know if I’m missing something.
AditiThirdEye commentedon Jan 3, 2026
Hi @PierreMarieCurie, thanks for taking a look!
You're right - I reviewed both implementations and they are essentially the same approach (checking parent directory existence + testing write permissions via temp file).
Since your PR #4449 was submitted first, I'm happy to close mine and defer to yours. No need to duplicate effort!