Fix tile_dot for scalar float64 tiles#1565
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAdds a missing Changesfloat64 scalar tile_dot fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR fixes a compilation failure in
Confidence Score: 5/5Safe to merge — the change is a single-line targeted fix with a matching regression test and no side effects on existing code paths. The new tensordot(float64, float64) overload is a direct, minimal mirror of the existing float overload and delegates to mul(float64, float64) which already exists via DECLARE_FLOAT_OPS. There is no risk of breaking other overloads, and the template dispatch in tile_dot / adj_tile_dot now resolves cleanly for float64. The test validates correctness end-to-end at float64 precision. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["wp.tile_dot(a, b)\n(TileA::Type = float64)"] --> B["tile_dot template\nScalarT = decltype(tensordot(float64{}, float64{}))"]
B --> C{"tensordot overload\nresolution"}
C -->|"Before PR\n(missing overload)"| D["❌ Compilation failure"]
C -->|"After PR\n(new overload added)"| E["tensordot(float64, float64)\n→ mul(a, b) → a * b"]
E --> F["thread_sum += tensordot(...)"]
F --> G["Cross-thread reduction\n(warp shuffle / atomic)"]
G --> H["Single-element float64\noutput tile"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["wp.tile_dot(a, b)\n(TileA::Type = float64)"] --> B["tile_dot template\nScalarT = decltype(tensordot(float64{}, float64{}))"]
B --> C{"tensordot overload\nresolution"}
C -->|"Before PR\n(missing overload)"| D["❌ Compilation failure"]
C -->|"After PR\n(new overload added)"| E["tensordot(float64, float64)\n→ mul(a, b) → a * b"]
E --> F["thread_sum += tensordot(...)"]
F --> G["Cross-thread reduction\n(warp shuffle / atomic)"]
G --> H["Single-element float64\noutput tile"]
Reviews (4): Last reviewed commit: "Remove unused tile test variable" | Re-trigger Greptile |
Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
4061315 to
c6269e6
Compare
Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
43eb63f to
e32d6d4
Compare
|
Quick bump here. I addressed the review note and the visible checks are green on my end. Happy to adjust anything else if needed. |
|
Hi @kiwigitops, we’re closing this pull request because #1563 has now been fixed on The merged fix addresses the same underlying issue with a type-preserving scalar We should have let you know sooner that a broader fix was in progress. We appreciate the work and testing you contributed here. For future work on assigned issues, please coordinate in the issue thread first so we can avoid parallel implementations. |
Summary
float64nativetensordot()overloadwp.tile_dot()on scalarwp.float64tiles with a CPU regression testValidation
python build_lib.py --no-cuda --no-use-libmathdx -j 4python -m unittest warp.tests.tile.test_tile_fused_ops.TestTileFusedOps.test_tile_dot_basic_cpu warp.tests.tile.test_tile_fused_ops.TestTileFusedOps.test_tile_dot_float64_scalar_cpu -vCloses #1563
Summary by CodeRabbit
New Features
Tests
tile_dotresults against NumPy with float64-appropriate tolerance.