Skip to content

Conversation

@larryliu0820
Copy link
Contributor

  • 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-poisoned]
@larryliu0820
Copy link
Contributor Author

larryliu0820 commented Dec 24, 2025

larryliu0820 added a commit that referenced this pull request Dec 24, 2025
- 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
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 24, 2025

🔗 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 Failures

As of commit 1637ec1 with merge base c5d66a5 (image):

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants