Skip to content

Commit

Permalink
compiler builtin detection failing for nvcc
Browse files Browse the repository at this point in the history
Summary:
cuda 12.5 & platform010 w/ clang-15 seem to choke on this builtin. It seems like NVCC started to incorrectly report that it supports this builtin, but then doesn't provide the implementation.

It seems like this builtin is very rarely used in fbsource. I can only find one reference:
https://www.internalfb.com/code/fbsource/[df6fa76c6cd1d4956407c84ee5cf1f645255cb98]/xplat/thrift/lib/cpp/util/VarintUtils-inl.h?lines=474
so the surface area for failures should be pretty small

Reviewed By: Gownta

Differential Revision: D67039459

fbshipit-source-id: a2b9ebcb5dec12de2bdd7b95686da3c7a50764bd
  • Loading branch information
EscapeZero authored and facebook-github-bot committed Dec 14, 2024
1 parent aca2128 commit d789fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third-party/folly/src/folly/lang/Hint-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FOLLY_ALWAYS_INLINE void compiler_may_unsafely_assume_separate_storage(
void const* const a, void const* const b) {
FOLLY_SAFE_DCHECK(
a != b, "compiler-hint separate storage assumption fails at runtime");
#if FOLLY_HAS_BUILTIN(__builtin_assume_separate_storage)
#if FOLLY_HAS_BUILTIN(__builtin_assume_separate_storage) && !defined(__CUDACC__)
__builtin_assume_separate_storage(a, b);
#endif
}
Expand Down

0 comments on commit d789fd9

Please sign in to comment.