Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/194977
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cd95cc8 with merge base 4380f31 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
I think some older MacOS builds are using an older version of Apple Clang that is missing concepts support |
|
Is executorch updated to support cpp20 properly yet? |
|
@Skylion007 I am not sure if executorch supports this properly but I see an open issue and a PR so probably not |
4f0d33f to
979b6c1
Compare
|
@Skylion007 I reverted the |
979b6c1 to
52b4414
Compare
52b4414 to
cd95cc8
Compare
| template <typename... Ts> | ||
| using enable_if_ivalue_compatible = | ||
| std::enable_if<std::conjunction< | ||
| std::negation<std::is_lvalue_reference<Ts>>..., | ||
| std::is_constructible<IValue, Ts>...>::value>; |
There was a problem hiding this comment.
Note for reviewers: This pattern of using enable_if_BLABLA = ...; is pretty common in the IValue class.
|
@pytorchmergebot merge |
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 |
Forward fix for D117882908 (#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 #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: #195671 Approved by: https://github.com/pytorchgreenlight, https://github.com/Skylion007
) 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
No description provided.