From 53d816b154d7245c690488e4d7f2e420f0e9778c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 8 Aug 2026 07:53:35 +0000 Subject: [PATCH] =?UTF-8?q?doc(prd):=20CCCL=20agent=5Frle=20+=20adjacent?= =?UTF-8?q?=5Fdifference=20=E2=86=92=20streaming=20mapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agent_rle.cuh (1072 lines) complete design: BlockDiscontinuity for segment detection + streaming_context for cross-tile state + ScatterDirect for compact output. Maps to reasoning/content segment detection in streaming SSE responses. adjacent_difference maps to streaming delta_text computation. --- PRD.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/PRD.md b/PRD.md index b6573c08..c5ac8b7e 100644 --- a/PRD.md +++ b/PRD.md @@ -84,3 +84,22 @@ CCCL三级分发:compute_capability → sm_tuning → benchmark参数 | d04 reasoning | 17.78s | 1192 | 67 | | d07 reasoning+content | 61.11s | 4451 | 72.8 | | replay avg | - | - | 11.86 | + +## CCCL agent_rle.cuh → streaming SSE 映射 + +| CCCL agent_rle | serving_chat.py | +|---------------|----------------| +| streaming_context.num_uniques() | reasoning_token_counts[i] | +| streaming_context.base_offset() | previous_num_tokens[i] | +| BlockDiscontinuity (值变化检测) | reasoning_end_arr[i] (检测) | +| per-partition isolated state | per-choice state arrays | +| ScatterDirect (压缩输出) | delta_message分发 | + +## CCCL adjacent_difference → streaming delta 映射 + +| CCCL adjacent_diff | serving_chat.py | +|-------------------|----------------| +| SubtractLeftCopy | delta_text = output.text (保留原始+输出差值) | +| previous element | previous_texts[i] | +| current = prev + delta | current_text = previous_text + delta_text | +| update prev = current | previous_texts[i] = current_text |