Skip to content

Commit 87666fb

Browse files
fix: Rename missing instances
Signed-off-by: Alberto Perdomo <aperdomo@redhat.com>
1 parent af441b0 commit 87666fb

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/epp/framework/plugins/requestcontrol/dataproducer/burstprefix/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (p *dataProducer) Produces() map[plugin.DataKey]any {
7777
// before this producer and one is auto-created when none is configured.
7878
func (p *dataProducer) Consumes() plugin.DataDependencies {
7979
return plugin.DataDependencies{
80-
Required: map[plugin.DataKey]any{tokenproducer.TokenizedPromptDataKey: fwksched.TokenizedPrompt{}},
80+
Required: map[plugin.DataKey]any{tokenproducer.TokenizedPromptDataKey: fwksched.TokenizedRequest{}},
8181
}
8282
}
8383

pkg/epp/framework/plugins/requestcontrol/dataproducer/burstprefix/plugin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
func tokenizedRequest(tokens []uint32) *fwksched.InferenceRequest {
3333
return &fwksched.InferenceRequest{
3434
Body: &fwkrh.InferenceRequestBody{
35-
TokenizedPrompt: &fwkrh.TokenizedPrompt{PerPromptTokens: [][]uint32{tokens}},
35+
TokenizedRequest: &fwkrh.TokenizedRequest{Prompts: []fwkrh.PromptTokens{{TokenIDs: tokens}}},
3636
},
3737
}
3838
}

pkg/epp/framework/plugins/requestcontrol/dataproducer/prefixhash/hashing.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ func (b HashBlock) Hash() uint64 {
5252
}
5353

5454
// GetBlockHashes divides the tokenized prompt into blocks and calculates a
55-
// prefix cache hash for each block. Each prompt in PerPromptTokens is hashed
55+
// prefix cache hash for each block. Each prompt in Prompts is hashed
5656
// independently so cross-prompt block adjacency is avoided. The first block
5757
// hash of every prompt includes the model name and cache salt (if provided).
5858
// For subsequent blocks, the hash is calculated as: hash(block i content, hash(i-1)).
59-
// It requires request.Body.TokenizedPrompt to be populated by a token-producer backend.
59+
// It requires request.Body.TokenizedRequest to be populated by a token-producer backend.
6060
func GetBlockHashes(ctx context.Context, request *scheduling.InferenceRequest, blockSizeTokens int, maxPrefixBlocks int) [][]BlockHash {
6161
loggerDebug := log.FromContext(ctx).V(logutil.DEBUG)
6262
if request == nil || request.Body == nil {
@@ -71,8 +71,8 @@ func GetBlockHashes(ctx context.Context, request *scheduling.InferenceRequest, b
7171
}
7272

7373
var result [][]BlockHash
74-
for _, tokens := range tp.PerPromptTokens {
75-
seq := getKVCacheBlocksFromTokens(tokens, blockSizeTokens)
74+
for _, p := range tp.Prompts {
75+
seq := getKVCacheBlocksFromTokens(p.TokenIDs, blockSizeTokens)
7676
hashes := computeBlockHashes(seq, request, maxPrefixBlocks)
7777
if len(hashes) > 0 {
7878
result = append(result, hashes)

0 commit comments

Comments
 (0)