fix: rename device_id → device_ids for API consistency#1020
Open
shagsood wants to merge 1 commit into
Open
Conversation
QEFFAutoModelForCausalLM.generate() accepted `device_id` (singular)
while all other model classes (QEFFAutoModel, QEFFAutoModelForImageTextToText,
QEFFAutoModelForSpeechSeq2Seq, QEFFAutoModelForCTC, QAICInferenceSession)
already used `device_ids` (plural). All accept List[int], so the singular
name was misleading and required callers to look up the correct kwarg per
class.
Rename `device_id` → `device_ids` uniformly in:
- QEFFAutoModelForCausalLM.generate() signature + docstring
- cloud_ai_100_exec_kv() / latency_stats_bertstyle() in text_generation_inference.py
- TextGeneration / TextGenerationMultiQPC constructors
- VisionLanguageGeneration.__init__() + self.device_ids attribute
- QEFFLoRAForCausalLM.generate()
- cloud/infer.py, cloud/execute.py, utils/run_utils.py call sites
- examples: basic_inference, moe_inference, continuous_batching,
multi_adapter, on_device_sampling, text_inference_cpp
device_utils.get_available_device_id() is a different function (returns
a single free device ID for probing); it is intentionally left unchanged.
Signed-off-by: shagsood <shagsood@qti.qualcomm.com>
7323d18 to
30c1914
Compare
Contributor
|
LGTM, thanks. @quic-rishinr can you check? |
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.
QEFFAutoModelForCausalLM.generate() accepted
device_id(singular) while all other model classes (QEFFAutoModel, QEFFAutoModelForImageTextToText, QEFFAutoModelForSpeechSeq2Seq, QEFFAutoModelForCTC, QAICInferenceSession) already useddevice_ids(plural). All accept List[int], so the singular name was misleading and required callers to look up the correct kwarg per class.Rename
device_id→device_idsuniformly in:device_utils.get_available_device_id() is a different function (returns a single free device ID for probing); it is intentionally left unchanged.