Commit Graph

5 Commits

Author SHA1 Message Date
Lucian Grijincu
bf3dcb9599 fix anon-struct usage that's a warning/error -Wnon-c-typedef-for-linkage (#137)
Summary:
X-link: https://github.com/facebook/CacheLib/pull/137

Fix
  error: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]

Test Plan:
```name=before
buck-out/v2/gen/fbcode/d839c731f5505c62/datasec/messaging/auth/utils/__MessagingAuthUtils__/headers/datasec/messaging/auth/utils/MessagingAuthLogger.h:83:25: error: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
  using LogInfo = struct {
```

CI

Reviewed By: philippv

Differential Revision: D36043476

Pull Request resolved: https://github.com/pytorch/pytorch/pull/76610
Approved by: https://github.com/philippv, https://github.com/osalpekar
2022-05-02 18:14:30 +00:00
Richard Barnes
8a247fb418 LLVM-12 fix for shm_mutex (#65781)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65781

Fixes
```
stderr: In file included from caffe2/caffe2/contrib/shm_mutex/shm_mutex.cc:1:
caffe2/caffe2/contrib/shm_mutex/shm_mutex.h:334:28: error: anonymous non-C-compatible type given name for linkage purposes by alias declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
using TicketStruct = struct : ShmBaseHeader {
                           ^
                            TicketStruct
caffe2/caffe2/contrib/shm_mutex/shm_mutex.h:334:31: note: type is not C-compatible due to this base class
using TicketStruct = struct : ShmBaseHeader {
                              ^~~~~~~~~~~~~
caffe2/caffe2/contrib/shm_mutex/shm_mutex.h:334:7: note: type is given name 'TicketStruct' for linkage purposes by this alias declaration
using TicketStruct = struct : ShmBaseHeader {
      ^
1 error generated.
Cannot execute a rule out of process. On RE worker. Thread: Thread[main,5,main]
Command failed with exit code 1.
```

Test Plan: Sandcastle

Reviewed By: ngimel

Differential Revision: D31248938

fbshipit-source-id: 47342fecc72ada9397a1b7bd6fcabfccf988dd3e
2021-09-28 22:51:38 -07:00
Orion Reblitz-Richardson
1d5780d42c Remove Apache headers from source.
* LICENSE file contains details, so removing from individual source files.
2018-03-27 13:10:18 -07:00
Yangqing Jia
8286ce1e3a Re-license to Apache
Summary: Closes https://github.com/caffe2/caffe2/pull/1260

Differential Revision: D5906739

Pulled By: Yangqing

fbshipit-source-id: e482ba9ba60b5337d9165f28f7ec68d4518a0902
2017-09-28 16:22:00 -07:00
Romain Cledat
3a91ac56cb Add a shared memory machine-wide mutex utility
Summary:
This can be used to serialize allocations and NCCL kernel calls
for example. Multiple such mutexes can be created per process.

Reviewed By: Yangqing, pietern

Differential Revision: D5073609

fbshipit-source-id: 28cc4293632f20e9623ee6531365b881d0f3d9ef
2017-06-15 15:54:31 -07:00