Qualcomm AI Engine Direct - fix extra argument in static Mimi decoder call - #22586
Open
Anai-Guo wants to merge 1 commit into
Open
Qualcomm AI Engine Direct - fix extra argument in static Mimi decoder call#22586Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
`inference_static_mimi_decoder` takes five parameters:
def inference_static_mimi_decoder(
args, qnn_config, encoded_results, pcm_chunk_size,
static_decoder_pte_filename,
):
The `--pre_gen_pte` branch calls it correctly, but the default
compile-and-run branch inserts `encoded_results_list` as a fourth
positional argument, so the normal path raises:
TypeError: inference_static_mimi_decoder() takes 5 positional
arguments but 6 were given
`encoded_results_list` is a newline-joined "input_N_0.raw" listing that
has no consumer: the decoder builds its own `runner_cmd` and calls
`adb.push(inputs=encoded_results)`, and `SimpleADB.push` has no
input-list parameter. The variable is only ever passed to this one call,
so it and its construction are removed along with the argument.
Signed-off-by: Tai An <antai12232931@outlook.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22586
Note: Links to docs will display an error until the docs builds have been completed.
|
|
This PR needs a
|
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.
Problem
examples/qualcomm/oss_scripts/moshi/mimi.pydefines the static decoder helper with five parameters:There are two call sites. The
--pre_gen_ptebranch (line 400) is correct, but thedefault compile-and-run branch (line 416) inserts
encoded_results_listas a fourthpositional argument:
so running the script without
--compile_only/--pre_gen_pte— the normal path —fails at decode time with:
Why the argument is dropped rather than added as a parameter
encoded_results_listis a newline-joined"input_N_0.raw"listing built inexport_mimi_decoder. It has no consumer:inference_static_mimi_decoderbuilds its ownrunner_cmd(--model_path,--output_folder_path) with no input-list flag;adb.push(inputs=encoded_results), andSimpleADB.push(
backends/qualcomm/export_utils.py) has signaturepush(self, inputs=None, files=None, backends=None, init_env=True)— noinput-list parameter;
adb.push(inputs=inputs).encoded_results_listis referenced nowhere else in the file, so this PR removes thestray argument together with the two lines that build the now-unused string. The
encoded_results[index] = encoder_result.to(torch.int32)conversion in the same loopis kept.
Verification
Signature replay against
main(4ce2ec2):Diff is three deleted lines; no behavior other than the crash changes.
🤖 Generated with Claude Code