Skip to content

Add OrtErrorCode::ORT_DEVICE_RESET. - #29748

Merged
tianleiwu merged 2 commits into
mainfrom
edgchen1/device_reset_error_code
Jul 17, 2026
Merged

Add OrtErrorCode::ORT_DEVICE_RESET.#29748
tianleiwu merged 2 commits into
mainfrom
edgchen1/device_reset_error_code

Conversation

@edgchen1

Copy link
Copy Markdown
Contributor

Description

Add OrtErrorCode::ORT_DEVICE_RESET.

Motivation and Context

This error code was requested to support cases like QNN EP subsystem restart.

@tirupath-qti tirupath-qti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new public C API error code (OrtErrorCode::ORT_DEVICE_RESET) intended to let execution providers report a device-reset condition (e.g., after a QNN EP subsystem restart), and wires it into the internal StatusCode enum for consistency across the runtime.

Changes:

  • Added ORT_DEVICE_RESET to the public OrtErrorCode enum with guidance for callers to recreate sessions.
  • Added DEVICE_RESET to onnxruntime::common::StatusCode to keep C++ status codes aligned with the C API.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
include/onnxruntime/core/session/onnxruntime_error_code.h Adds new public OrtErrorCode::ORT_DEVICE_RESET with documentation.
include/onnxruntime/core/common/status.h Adds internal StatusCode::DEVICE_RESET mapped to the new C API error code.

Comment thread include/onnxruntime/core/common/status.h
Comment thread include/onnxruntime/core/common/status.h
Comment thread include/onnxruntime/core/session/onnxruntime_error_code.h
@tianleiwu
tianleiwu enabled auto-merge (squash) July 17, 2026 20:31
@tianleiwu
tianleiwu merged commit 5911a3a into main Jul 17, 2026
97 of 99 checks passed
@tianleiwu
tianleiwu deleted the edgchen1/device_reset_error_code branch July 17, 2026 21:07
tianleiwu pushed a commit that referenced this pull request Jul 17, 2026
### Description
<!-- Describe your changes. -->

Add `OrtErrorCode::ORT_DEVICE_RESET`.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

This error code was requested to support cases like QNN EP subsystem
restart.
tianleiwu added a commit that referenced this pull request Jul 18, 2026
This cherry-picks the following commits for the release:

| Commit ID | PR Number | Commit Title |
|-----------|-----------|-------------|
| dd32f35 | #29590 | Fix libcudart.so.13 hard dependency in pybind
module breaking import on CPU-only Linux |
| cc44a4d | #29706 | [CUDA] Fix XQA GroupQueryAttention
cudaErrorInvalidValue on Blackwell (sm_120) |
| 23a7e9d | #29705 | [CUDA] Do not link nvrtc |
| ee93f83 | #29711 | [CUDA] Update cuda arch list for packages of
cuda 12.8 |
| fea45a3 | #29620 | [CUDA] Add cuDNN-free ArgMax/ArgMin/ReduceSum
and fix LogSoftmax on plugin EP |
| f05b218 | #29624 | Enable Spectre-mitigated MSVC libs for BinSkim
builds |
| 1c89b86 | #29687 | [BUILD] CUDA_QUANT_PREPROCESS off by default and
Adjust CI |
| 41bd391 | #29658 | [CUDA] Fix null allocator passed to plugin EP
kernel PrePack |
| 405fbea | #28896 | Add Windows ARM64 CUDA plugin package and align
CUDA metadata/artifact naming |
| 308f24c | #29622 | Enable fpA_intB GEMM in CUDA builds and add
configurable options |
| 16ebc1d | #29731 | [Build] Use GPU pool to unblock CI temporarily |
|5911a3a263| #29748 | Add OrtErrorCode::ORT_DEVICE_RESET |
|6217f73ec5 | #29663 | Fix plugin EP allocator deleter lifetime |

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: GitHub Copilot <copilot@example.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Co-authored-by: Yen-Shi Wang <yenshiw@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants