-
Notifications
You must be signed in to change notification settings - Fork 779
Integrate CUDA sampler into ASR runner and enable skip_copy for decoder #16388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh/larryliu0820/88/head
Are you sure you want to change the base?
Conversation
- cuda_backend.cpp: Support comma-separated method names in skip_copy_output_to_cpu_for_method backend option. - runner.cpp: Use CudaSampler for argmax when CUDA is available and temperature==0. Skip copy to CPU for both encoder and decoder methods. - CMakeLists.txt updates: Link against extension_llm_sampler_cuda library and include the sampler subdirectory. This optimization keeps decoder logits on GPU and performs argmax directly on GPU memory, avoiding unnecessary device-to-host copies in the decode loop. ghstack-source-id: e3e85c9 ghstack-comment-id: 3688378475 Pull-Request: #16388
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16388
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 2 Unrelated FailuresAs of commit 1637ec1 with merge base c5d66a5 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| std::lock_guard<std::mutex> guard(skip_copy_method_mutex_); | ||
| return method_name == skip_copy_method_; | ||
| // Support comma-separated list of method names | ||
| if (skip_copy_method_.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm can we make the skip_copy_method_ as an array? Maybe we can avoid the fancy comparsion here for supporting multiple method names
skip_copy_output_to_cpu_for_method backend option.
temperature==0. Skip copy to CPU for both encoder and decoder methods.
and include the sampler subdirectory.
This optimization keeps decoder logits on GPU and performs argmax directly
on GPU memory, avoiding unnecessary device-to-host copies in the decode loop.