Skip to content

Enable chunked prefill by default for supported execution providers - #939

Open
baijumeswani wants to merge 1 commit into
mainfrom
baijumeswani/chunked-prefill
Open

Enable chunked prefill by default for supported execution providers#939
baijumeswani wants to merge 1 commit into
mainfrom
baijumeswani/chunked-prefill

Conversation

@baijumeswani

Copy link
Copy Markdown
Collaborator

Sets the ORT GenAI chunk_size search option to  2048  by default for CPU, CUDA, Nv TensorRT RTX, and WebGPU.

Existing positive chunk_size values are preserved. Missing or zero values use the new default, while ORT GenAI determines whether the model supports chunked prefill. Tests cover provider selection and override behavior.

Copilot AI review requested due to automatic review settings July 31, 2026 17:43
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview Jul 31, 2026 5:43pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables a default chunked-prefill size for selected execution providers.

Changes:

  • Adds CPU provider-name recognition.
  • Passes execution-provider context into search-option handling.
  • Adds tests for defaults, overrides, and provider resolution.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
execution_provider_test.cc Tests CPU provider aliases.
search_options_test.cc Tests chunk-size behavior.
search_options.h Extends the search-options interface.
search_options.cc Applies provider-specific chunk defaults.
onnx_chat_generator.cc Supplies the model execution provider.
execution_provider.h Recognizes CPU provider names.

case ExecutionProvider::kTensorRT_RTX:
case ExecutionProvider::kWebGPU:
case ExecutionProvider::kCPU:
gen_params.SetSearchOption("chunk_size", kDefaultChunkSize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants