Skip to content

Remove s_kernel_registry_vitisaiep.reset() in deinitialize_vitisai_ep()#27295

Merged
tianleiwu merged 1 commit intomicrosoft:mainfrom
zz002:fix/vitisai-kernel-registry-reset
Feb 28, 2026
Merged

Remove s_kernel_registry_vitisaiep.reset() in deinitialize_vitisai_ep()#27295
tianleiwu merged 1 commit intomicrosoft:mainfrom
zz002:fix/vitisai-kernel-registry-reset

Conversation

@zz002
Copy link
Copy Markdown
Contributor

@zz002 zz002 commented Feb 10, 2026

Remove unnecessary s_kernel_registry_vitisaiep.reset() call in deinitialize_vitisai_ep() function. The kernel registry will be repopulated on next initialization, making this reset redundant.

@tianleiwu
Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 removes the s_kernel_registry_vitisaiep.reset() call from the VitisAI EP shutdown path (deinitialize_vitisai_ep()), based on the assumption that the kernel registry will be repopulated on the next initialization.

Changes:

  • Removed clearing of the global VitisAI KernelRegistry during deinitialize_vitisai_ep().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianleiwu
Copy link
Copy Markdown
Contributor

@zz002, could you review Copilot's feedback and see whether this change is expected?

@amd-genmingz
Copy link
Copy Markdown
Contributor

@tianleiwu deinitialize_vitisai_ep is a Shutdown function, it means that the entire provider_vitisai.dll will be released via UnloadDynamicLibrary. At that time, the corresponding shared_ptr will also be deleted, which has the same effect as calling reset(). Therefore, we believe this modification is consistent with the expected behavior.
During our debugging process, we found that calling this function during the process detach phase would cause an error. The reason is that its control block had already been destroyed at that point for some unknown reason. Therefore, we removed this line to prevent the crash.

@tianleiwu tianleiwu enabled auto-merge (squash) February 28, 2026 18:46
@tianleiwu tianleiwu merged commit 6e72d31 into microsoft:main Feb 28, 2026
92 checks passed
tianleiwu pushed a commit that referenced this pull request Feb 28, 2026
…() (#27295)

Remove unnecessary s_kernel_registry_vitisaiep.reset() call in
deinitialize_vitisai_ep() function. The kernel registry will be
repopulated on next initialization, making this reset redundant.
tianleiwu added a commit that referenced this pull request Mar 2, 2026
This cherry-picks the following commits for the release:

| Commit ID | PR Number | Commit Title |
|-----------|-----------|-------------|
| 6e72d31 | #27295 | Remove s_kernel_registry_vitisaiep.reset() in
deinitialize_vitisai_ep() |
| 41f9056 | #27391 | Fix O(n²) model load time for TreeEnsemble with
categorical feature chains |

---------

Co-authored-by: zz002 <zhenzew@amd.com>
Co-authored-by: Adam Scarr <adam@vektah.net>
Kevin-Taha pushed a commit that referenced this pull request Mar 17, 2026
…() (#27295)

Remove unnecessary s_kernel_registry_vitisaiep.reset() call in
deinitialize_vitisai_ep() function. The kernel registry will be
repopulated on next initialization, making this reset redundant.
adrastogi pushed a commit that referenced this pull request Mar 17, 2026
…() (#27295)

Remove unnecessary s_kernel_registry_vitisaiep.reset() call in
deinitialize_vitisai_ep() function. The kernel registry will be
repopulated on next initialization, making this reset redundant.
adrastogi pushed a commit that referenced this pull request Mar 19, 2026
…() (#27295)

Remove unnecessary s_kernel_registry_vitisaiep.reset() call in
deinitialize_vitisai_ep() function. The kernel registry will be
repopulated on next initialization, making this reset redundant.
adrastogi added a commit that referenced this pull request Mar 31, 2026
This cherry-picks the following commits for the release:

- #26434 [VitisAI]add tensor type bool
- #26452 [VitisAI EP] Fix error in graph resolving
- #26487 [VitisAI] Enable ort::logger usage in
compile_onnx_model_vitisai_ep_v4
- #26519 [VitisAI] Remove unused function body handling in graph fusion
- #26627 [VitisAI] Add External EP Loader
- #26699 [VitisAI] Add support compiled model compatibility information
retrieval and validation
- #27295 Remove s_kernel_registry_vitisaiep.reset() in
deinitialize_vitisai_ep()
- #27356 Add/Update telemetry events
- #27626 Add PE version info to onnxruntime_providers_vitisai.dll
- #27693 Fix integer division by zero crash in CPU EP Div operator
- #27815 Fix overflow in DmlGraphFusionHelper::ProcessInputData
- #27823 Fix new-delete mismatch in DML EP's QuantizeLinear operator

---------

Co-authored-by: Yueqing Zhang <yuz75@Pitt.edu>
Co-authored-by: Yueqing Zhang <yueqingz@amd.com>
Co-authored-by: zpye <yezupei92@foxmail.com>
Co-authored-by: Chunye Wang@AMD <chunywan@amd.com>
Co-authored-by: mingyue <131847423+mingyueliuh@users.noreply.github.com>
Co-authored-by: zz002 <zhenzew@amd.com>
Co-authored-by: Darshak Bhatti <47045043+dabhattimsft@users.noreply.github.com>
Co-authored-by: Darshak Bhatti <dabhatti@micorsoft.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Xiaoxi Han <xiha@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Co-authored-by: skottmckay <979079+skottmckay@users.noreply.github.com>
Co-authored-by: Tianlei Wu <tlwu@microsoft.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.

6 participants