Fix the version gate on the free-threaded profiler warning (#194697)
> IS_PYTHON_3_14_PLUS is always defined (as `PY_VERSION_HEX >= 0x030E0000`), so `!defined(IS_PYTHON_3_14_PLUS)` was always false and the warning never fired on 3.13t. Introduced in #178551, which almost certainly meant to check the macro's boolean value, not whether it's defined. Fix uses the macro's value instead. > > Test plan: compiled a probe with the guard against free-threaded 3.14 headers; old form is unreachable on every version, new form is reachable only when pinned to a 3.13 `PY_VERSION_HEX`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/194697 Approved by: https://github.com/ryanzhang22
C
cyy committed
fcebff2edcedc4a973b6124659b9b7932db725ad
Parent: 60598ed
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com>
on 8/26/2026, 12:20:52 AM