Repository navigation
FP8: keep rowwise _scaled_mm for float32 where cuBLAS supports it (torch < 2.14) - #16393
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…nearity checks (#16426) ## Summary `tests/test_web_fetch_extraction.py::test_deeply_nested_tags_stay_linear` failed on #16393, an FP8 kernel PR that does not touch Studio: ``` FAILED tests/test_web_fetch_extraction.py::test_deeply_nested_tags_stay_linear - AssertionError: [0.03737169100008941, 0.4800274350000109] ``` The test times one `html_to_markdown` call at 1000 and at 4000 nested headers, and fails if the second takes more than 12x the first. Linear work gives about 4x and quadratic about 16x. Both arms were a single call, so one descheduled call on a shared runner reads as 13x growth. On this host, five back-to-back trials gave 3.5x to 4.6x. `test_deeply_nested_headers_do_not_blow_up_quadratically` in the same file has the same single-sample shape. `test_stray_end_tags_in_a_skipped_menu_stay_linear` already takes the best of five runs for exactly this reason. ## Change Both single-sample tests now take the minimum of five calls per size, the same as `test_stray_end_tags_in_a_skipped_menu_stay_linear`. Thresholds and inputs are unchanged. ## Testing - The two tests, `--count 5`: 10 passed. - Sabotage: an autouse fixture wraps `html_to_markdown` with a busy-wait quadratic in the input length. Both tests fail, so best of five still catches real quadratic growth.
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Follow-up to #15927.
Before torch 2.14, the rowwise
torch._scaled_mmfloat32 restriction belongs to the CUTLASS fallback. Hopper with CUDA/cuBLAS 12.9+ can use cuBLAS with float32 output, so the blanket fallback unnecessarily dequantizes the full weight on that configuration.This change probes float32 rowwise output support once per device and keeps the existing dequant fallback when unsupported. Shape and row-count eligibility are checked first, so decode-sized and unaligned calls do not run an irrelevant capability probe.
Validation:
Native Hopper execution and its performance benefit were not measured. The runtime capability distinction is supported by PyTorch's dispatch source and rowwise tests.