Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195671
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 2 PendingAs of commit 90fd42a with merge base b543bc5 ( GREEN LIGHT - PR approved to be merged without human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Skylion007
approved these changes
Sep 2, 2026
Collaborator
|
@pytorchbot merge |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Sanskaaar1
pushed a commit
to Sanskaaar1/pytorch
that referenced
this pull request
Sep 8, 2026
) Forward fix for D117882908 (pytorch#194977), which broke every arvr/ovrsource build that depends on `xplat/caffe2:ATen_lib_ovrsource`: ``` xplat/caffe2/aten/src/ATen/core/ivalue.h:516:18: error: missing 'typename' prior to dependent type name 'enable_if_ivalue_compatible<Args...>::type' xplat/caffe2/aten/src/ATen/core/ivalue_inl.h:1959:16: error: missing 'typename' prior to dependent type name 'IValue::enable_if_ivalue_compatible<Args...>::type' 3 errors generated. ``` That diff factored the tuple-constructor SFINAE into a new alias member: ``` template <typename... Ts> using enable_if_ivalue_compatible = std::enable_if<...>; // enable_if, not enable_if_t ``` and uses it as `typename = enable_if_ivalue_compatible<Args...>::type`. Since the alias expands to `std::enable_if<...>`, `::type` is a dependent name and needs the `typename` disambiguator. C++20's P0634R3 ("Down with typename!") makes `typename` optional in exactly this position -- the default argument of a type template parameter -- which is why this compiled everywhere the change was tested. This is not a language version difference: both fbcode and arvr build caffe2 at `-std=gnu++20`. It is a compiler version difference. fbcode uses clang-21, while `ATen_lib_ovrsource` under `arvr/mode/platform010/*` pins clang-15 (see the `x86_64-clang-dev-platform010` platform in `arvr/tools/build_defs/config/platform/linux/generated.bzl`), and clang did not implement P0634R3 until 16. Add the `typename` disambiguator at the three use sites. It is well formed in every standard from C++11 on, so it is also accepted by the newer compilers that already build the current form. The SFINAE predicate itself is left alone. Rewriting `!disjunction_v<is_lvalue_reference<Args>..., negation<is_constructible<IValue, Args>>...>` as `conjunction<negation<is_lvalue_reference<Ts>>..., is_constructible<IValue, Ts>...>` is a correct De Morgan transform and preserves the short-circuit ordering that keeps `is_constructible<IValue, T>` from being instantiated on reference types. `xplat/caffe2` is updated to keep it in sync with `fbcode/caffe2`. This should also go upstream to pytorch#194977, since OSS CI will hit the same error on any clang-15 build. Differential Revision: [D118389865](https://our.internmc.facebook.com/intern/diff/D118389865/) Pull Request resolved: pytorch#195671 Approved by: https://github.com/pytorchgreenlight, https://github.com/Skylion007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Forward fix for D117882908 (#194977), which broke every
arvr/ovrsource build that depends on
xplat/caffe2:ATen_lib_ovrsource:That diff factored the tuple-constructor SFINAE into a new alias member:
and uses it as
typename = enable_if_ivalue_compatible<Args...>::type. Sincethe alias expands to
std::enable_if<...>,::typeis a dependent name andneeds the
typenamedisambiguator.C++20's P0634R3 ("Down with typename!") makes
typenameoptional in exactlythis position -- the default argument of a type template parameter -- which is
why this compiled everywhere the change was tested. This is not a language
version difference: both fbcode and arvr build caffe2 at
-std=gnu++20. It isa compiler version difference. fbcode uses clang-21, while
ATen_lib_ovrsourceunder
arvr/mode/platform010/*pins clang-15 (see thex86_64-clang-dev-platform010platform inarvr/tools/build_defs/config/platform/linux/generated.bzl), and clang did notimplement P0634R3 until 16.
Add the
typenamedisambiguator at the three use sites. It is well formed inevery standard from C++11 on, so it is also accepted by the newer compilers
that already build the current form.
The SFINAE predicate itself is left alone. Rewriting
!disjunction_v<is_lvalue_reference<Args>..., negation<is_constructible<IValue, Args>>...>as
conjunction<negation<is_lvalue_reference<Ts>>..., is_constructible<IValue, Ts>...>is a correct De Morgan transform and preserves the short-circuit ordering that
keeps
is_constructible<IValue, T>from being instantiated on reference types.xplat/caffe2is updated to keep it in sync withfbcode/caffe2.This should also go upstream to #194977, since OSS CI will hit
the same error on any clang-15 build.
Differential Revision: D118389865