Skip to content

[QNN EP] Thread safe unique name generator - #25738

Merged
HectorSVC merged 1 commit into
microsoft:mainfrom
CodeLinaro:dev/yuduo/lock-unique-name-generator
Aug 14, 2025
Merged

[QNN EP] Thread safe unique name generator#25738
HectorSVC merged 1 commit into
microsoft:mainfrom
CodeLinaro:dev/yuduo/lock-unique-name-generator

Conversation

@qti-yuduo

Copy link
Copy Markdown
Contributor

Follow up for #25702.

Improve thread safety.

@HectorSVC
HectorSVC requested a review from Copilot August 13, 2025 18:11
@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Aug 13, 2025

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 improves thread safety in the QNN execution provider by adding mutex protection to the unique name generator function. The change ensures that concurrent access to the static counter map is properly synchronized.

  • Adds mutex protection around static counter access
  • Refactors counter increment logic for better performance
  • Ensures thread-safe unique name generation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread onnxruntime/core/providers/qnn/builder/qnn_utils.cc
Comment thread onnxruntime/core/providers/qnn/builder/qnn_utils.cc

@HectorSVC HectorSVC 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.

:shipit:

@HectorSVC

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,Windows x64 QNN CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC
HectorSVC merged commit b8821e9 into microsoft:main Aug 14, 2025
88 of 92 checks passed
gedoensmax pushed a commit to gedoensmax/onnxruntime that referenced this pull request Sep 2, 2025
qti-yuduo pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Sep 24, 2025
@qti-yuduo
qti-yuduo deleted the dev/yuduo/lock-unique-name-generator branch September 24, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:QNN issues related to QNN exeution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants