Repository navigation
fix(runtime): repair evaluation CLIs and honor GPU device selection - #3813
Merged
Merged
Conversation
Keep runtime evaluation import-safe and use the requested inference device. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.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.
Summary
test_cer.py,test_rtf.pyandtest_rtf_gpu.pyimport-safe, with lazyfunasr_onnx/funasr_torchimports instead of the nonexistentfunasr.runtimenamespace. Existing script paths and boolean aliases remain.CUDA0 and refuses ONNX CPU fallback. TorchScript model buffers and input
tensors now use the same explicit device.
preserve spaces in SCP paths, reject malformed/empty input and missing
inference rows, and write space-delimited transcript token files.
Actual Validation
Final focused run: 44passed, zero skips (38CLI +6real native CPU cases).
CPU despite device0; ONNX control passed. After repair: 6native GPU cases
passed, covering real frontend/decoder and transcript/serial RTF subprocesses.
TorchScript/ONNX weights and generated 1.0s+0.5s audio. Torch profiler records
6CUDA kernels; ORT records 10CUDA nodes /0CPU nodes, including MatMul.
Raw transcripts, source/fixture hashes, device/dependencies and profiles are
retained on shared storage. Float32 tensors use existing TF32 settings.
tests/test_funasr_onnx_paraformer_online_empty_final.pycannot import theseparately installed
funasr_onnx. No test exclusion or skip was added tohide this; the three runtime-tool collection failures are removed.
Synthetic graphs prove runtime/device/CLI mechanics, not pretrained ASR
accuracy, leaderboard results, BF16 behavior, all timestamp variants, multiple
physical GPUs or performance improvements. No new weights were downloaded.
No Nano work or release is included. The old libtorch setup.py package-selection
issue is separate; README documents using checkout modules explicitly.
Reviewed in a separate author self-review, not independent GitHub/human review.
Prepared with OpenAI Codex assistance. Normal repository protections still apply.