Skip to content

Commit

Permalink
[fbsync] Remove VISION_INLINE_VARIABLE (#8416)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D57565240

fbshipit-source-id: 6c254a34194fe7d8d701d4c17b4bcce53e80c059
  • Loading branch information
NicolasHug authored and facebook-github-bot committed May 20, 2024
1 parent 27d5da1 commit 2bc9973
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions torchvision/csrc/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,3 @@
#else
#define VISION_API
#endif

#if (defined __cpp_inline_variables) || __cplusplus >= 201703L
#define VISION_INLINE_VARIABLE inline
#else
#ifdef _MSC_VER
#define VISION_INLINE_VARIABLE __declspec(selectany)
#else
#define VISION_INLINE_VARIABLE __attribute__((weak))
#endif
#endif
2 changes: 1 addition & 1 deletion torchvision/csrc/vision.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace vision {
VISION_API int64_t cuda_version();

namespace detail {
extern "C" VISION_INLINE_VARIABLE auto _register_ops = &cuda_version;
extern "C" inline auto _register_ops = &cuda_version;
} // namespace detail
} // namespace vision

0 comments on commit 2bc9973

Please sign in to comment.