[PR #1943] [MERGED] fix(design-grammar): Fc incorrectly bundled into sharding's symbols #36553

Closed
opened 2026-07-16 00:28:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1943
Author: @Shashank-Tripathi-07
Created: 7/7/2026
Status: Merged
Merged: 7/10/2026
Merged by: @profvjreddi

Base: devHead: fix/design-grammar-fc-sharding-symbol


📝 Commits (1)

  • 333f760 fix(design-grammar): Fc incorrectly bundled into sharding's symbols

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 design-grammar/rewrite-rules.yml (+11 -1)

📄 Description

Summary

  • rewrite-rules.yml's sharding rule listed symbols: ["Sy", "Fc"], but Fc is a distinct primitive in grammar.yml (id: 31, name: "Factorization" -- low-rank matrix decomposition), not a synonym for sharding.
  • paper.tex also treats Fc as its own transformation independent of sharding (e.g. "Capacity (second pass): Fc (low-rank KV approximation...)" listed as a separate filter-path candidate alongside Sy).
  • There was no separate factorization rewrite rule anywhere in the file, so Fc's rewrite semantics were silently conflated with Sharding's relieves/preserves/tradeoffs.

Fix

Removed Fc from sharding's symbols and added a dedicated factorization rule, using Fc's own grammar.yml description ("Approximating a massive matrix as the product of smaller ones (Low-Rank)") and paper.tex's capacity framing.

Test plan

  • Confirmed Fc now appears exactly once in rewrite-rules.yml, in its own factorization rule.
  • Parsed the file with js-yaml to confirm well-formed structure (14 rules total, sharding.symbols == ["Sy"]).
  • node scripts/validate.mjs (grammar.yml's own validator) still passes cleanly.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1943 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 7/7/2026 **Status:** ✅ Merged **Merged:** 7/10/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/design-grammar-fc-sharding-symbol` --- ### 📝 Commits (1) - [`333f760`](https://github.com/harvard-edge/cs249r_book/commit/333f760176a5919174ac15a0d9f660764e6aa9ec) fix(design-grammar): Fc incorrectly bundled into sharding's symbols ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `design-grammar/rewrite-rules.yml` (+11 -1) </details> ### 📄 Description ## Summary - `rewrite-rules.yml`'s `sharding` rule listed `symbols: ["Sy", "Fc"]`, but `Fc` is a distinct primitive in `grammar.yml` (`id: 31, name: "Factorization"` -- low-rank matrix decomposition), not a synonym for sharding. - `paper.tex` also treats `Fc` as its own transformation independent of sharding (e.g. "Capacity (second pass): Fc (low-rank KV approximation...)" listed as a separate filter-path candidate alongside `Sy`). - There was no separate `factorization` rewrite rule anywhere in the file, so `Fc`'s rewrite semantics were silently conflated with Sharding's `relieves`/`preserves`/`tradeoffs`. ## Fix Removed `Fc` from `sharding`'s `symbols` and added a dedicated `factorization` rule, using `Fc`'s own `grammar.yml` description ("Approximating a massive matrix as the product of smaller ones (Low-Rank)") and `paper.tex`'s capacity framing. ## Test plan - [x] Confirmed `Fc` now appears exactly once in `rewrite-rules.yml`, in its own `factorization` rule. - [x] Parsed the file with `js-yaml` to confirm well-formed structure (14 rules total, `sharding.symbols == ["Sy"]`). - [x] `node scripts/validate.mjs` (grammar.yml's own validator) still passes cleanly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-16 00:28:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#36553