Address QNN specific regressions - #1470
Merged
Baiju Meswani (baijumeswani) merged 4 commits intoMay 12, 2025
Merged
Conversation
Baiju Meswani (baijumeswani)
requested review from
Ryan Hill (RyanUnderhill) and
Edward Chen (edgchen1)
May 10, 2025 07:35
Co-authored-by: Ryan Hill <38674843+RyanUnderhill@users.noreply.github.com>
Ryan Hill (RyanUnderhill)
approved these changes
May 12, 2025
Collaborator
Author
|
Thank you for the review. :) |
| WindowedInputIDs::WindowedInputIDs(State& state) : state_{state} { | ||
| if (model_.p_device_inputs_->GetType() != DeviceType::QNN && | ||
| model_.p_device_inputs_->GetType() != DeviceType::CPU) { | ||
| throw std::runtime_error("Sliding a window over input_ids works with either the QNN or the CPU provider."); |
Contributor
There was a problem hiding this comment.
Suggested change
| throw std::runtime_error("Sliding a window over input_ids works with either the QNN or the CPU provider."); | |
| throw std::runtime_error("Sliding a window over input_ids only works with either the QNN or the CPU provider."); |
| auto providers_list = providers; | ||
| if (!is_primary_session_options) { | ||
| // Providers specified in a non-primary provider options list are added | ||
| // to the primary providers. They are considered immutable and implcitly |
Contributor
There was a problem hiding this comment.
Suggested change
| // to the primary providers. They are considered immutable and implcitly | |
| // to the primary providers. They are considered immutable and implicitly |
| // Fallback to CPU if no provider specific interface was set | ||
| if (!p_device_) | ||
| p_device_ = GetDeviceInterface(DeviceType::CPU); | ||
| if (!p_device_) { |
Contributor
There was a problem hiding this comment.
would it be worth verifying that if session_device != nullptr && p_device_ != nullptr, then session_device->GetType() == p_device_->GetType()?
Baiju Meswani (baijumeswani)
added a commit
that referenced
this pull request
May 12, 2025
Ryan Hill (RyanUnderhill)
pushed a commit
that referenced
this pull request
May 12, 2025
Ryan Hill (RyanUnderhill)
pushed a commit
that referenced
this pull request
May 12, 2025
Merged
Baiju Meswani (baijumeswani)
added a commit
that referenced
this pull request
May 14, 2025
Address previous PR review comments from #1470 (#1473) Address QNN specific regressions (#1470) Fix array eos_token_id handling (#1463) Constrained decoding integration (#1381) Remove BF16 CPU from valid GQA configuration (#1469) Avoid adding providers if not requested (#1464) Persist provider options across ClearProviders, AppendProvider where possible (#1454) Fix accuracy issues with Gemma models (#1448) Add bfloat16 support in model builder (#1447) Add final norm for LoRA models (#1446) Update version to 0.8.0-rc3 --------- Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com> Co-authored-by: Nenad Banfic <46795300+nenad1002@users.noreply.github.com> Co-authored-by: Nenad Banfic <nebanfic@microsoft.com> Co-authored-by: Baiju Meswani <bmeswani@microsoft.com> Co-authored-by: Abhishek Jindal <abjindal@microsoft.com> Co-authored-by: Ying Xiong <yingxiong@microsoft.com> Co-authored-by: Michał Moskal <michal@moskal.me> Co-authored-by: Kunal Vaishnavi <kvaishnavi@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recent changes broke QNN execution provider. Fixes in this PR:
enable_htp_shared_memory_allocator=1since the QNN device allocator is only made available when this option is set.