-
Notifications
You must be signed in to change notification settings - Fork 332
[Example] Add correctness assert into dsa example #937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces a global tensor-similarity utility replacing prior helpers and integrates it into the sparse MLA forward example. The example now conditionally validates outputs against a reference when SKV <= 4096 and updates the default SKV to 4096. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant Main as sparse_mla_fwd.py (__main__)
participant Kern as sparse_mla_fwd
participant Ref as ref_sparse_mla_fwd_interface
participant Util as assert_tensors_similar
U->>Main: Run with SKV (default 4096)
Main->>Kern: Compute tl_out
alt SKV ≤ 4096
Main->>Ref: Compute ref_out
Main->>Util: Compare tl_out vs ref_out (eps)
opt similarity < threshold
Util-->>Main: Error (diff, threshold)
end
opt similarity ≥ threshold
Util-->>Main: Pass confirmation
end
else SKV > 4096
Main-->>U: Skip reference comparison
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit