Add RoPE kernel to latency-demo roofline notebook (#167) - #199
Conversation
lasch
left a comment
There was a problem hiding this comment.
Same issues detected as previously in #197
- reinvention of
_access_tilehelper - silent wrong output when
seq_lendoesn't divide evenly bygrid_s * tile_seq, or
num_headsdoesn't divide evenly bygrid_h- optional, since all other kernels follow the same pattern, since the case is not exercised in the notebook
Spec-safe, and correct where exercised. All six new access tiles use Agreeing with 1. 2. Adding to 3. The 32-core grid gives up the locality the section calls the point of the kernel — a question about intent, not a request. The cos/sin reuse group is exactly
The stated reason for 4. No test. Smaller things:
Verdict — COMMENT. No correctness defect on the exercised path, and nothing touching spec-defined semantics. The one line standing between this and merge is the docstring's |
Address review comments L1-L2, R1-R5: - Fix AI formula docstring (R1) - Add divisibility guards for grid params (R2/L2) - Replace 6 inline access-tile blocks with _access_tile helper (L1) - Document grid [seq,heads] intent for pipeline alignment (R3) - Pass ROPE_TILE_SEQ explicitly, complete RoPE formula in markdown (R5) - Add tests/test_nb_run_kernels.py: AI watermark, per-core structure, and divisibility guard tests (R4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hao Yu <yuh@us.ibm.com>
f07c54e to
6fe6ef5
Compare
|
Notes for re-review :) 6fe6ef5 commit. Attn: @lasch @WarningRan Purpose
Gists and rough Actions for review comments
Review Notes and Code Change LocationsHope this helps the communication.
Test Groups from R4
Verification steps in the agentic process.
Additional steps of verification
" |
lasch
left a comment
There was a problem hiding this comment.
/lgtm
thx for addressing the comments
Close: issue #167
Belonging Epic: #94
Independent from sibling issues #164 #165 #166 and the addressing PRs.
Notes for Reviewing:
Integrate a parameterized RoPE forward generator and 3-config scaling study (4-core [2,2], 32-core strong [8,4], 32-core weak [8,4]) into the multi-kernel roofline sections alongside matmul/softmax/SDPA/paged-attn.
Design choices:
latency_demo_rope_before.html
latency_demo_rope_after.html