SIGN IN SIGN UP

[inductor] Fix flex flash captured-float test expectation (#194483)

**Impact:** CI only (single flex_attention FLASH test)
**Risk:** low

## What
Broaden the `assertRaisesRegex` in `test_captured_float_fails_with_dynamic` to accept either of the two valid rejection messages a captured Python float can trigger under `dynamic=True`.

## Why
The test asserted only the "captures a 0-dim CPU tensor" error. Depending on which tracer owns the unspecialized float's `.item()` proxy, the value can instead reach the HOP as a `SymFloat` and get rejected by the flex_attention operand check ("can only be of ... but got ... SymFloat"). Both outcomes are correct rejections, so the test was flaky on the message text. The regex now matches either, and the docstring/comment explain the two paths.

Differential Revision: D117100365

Pull Request resolved: https://github.com/pytorch/pytorch/pull/194483
Approved by: https://github.com/pytorchgreenlight
J
Jean Schmidt committed
89f89a3028047cc93b97fd2ee43266dfae25f8d9
Parent: 16ee93b
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> on 8/23/2026, 7:07:22 AM