pytorch/caffe2/distributed/file_store_handler_op.cc
Nikita Shulga a9b0a921d5 Disable avoid-non-const-global-variables lint check (#62008)
Summary:
As GoogleTest `TEST` macro is non-compliant with it as well as `DEFINE_DISPATCH`

All changes but the ones to `.clang-tidy` are generated using following script:
```
for i in `find . -type f -iname "*.c*" -or -iname "*.h"|xargs grep cppcoreguidelines-avoid-non-const-global-variables|cut -f1 -d:|sort|uniq`;  do sed -i "/\/\/ NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)/d" $i; done
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/62008

Reviewed By: driazati, r-barnes

Differential Revision: D29838584

Pulled By: malfet

fbshipit-source-id: 1b2f8602c945bd4ce50a9bfdd204755556e31d13
2021-07-22 18:04:40 -07:00

27 lines
855 B
C++

#include "file_store_handler_op.h"
namespace caffe2 {
REGISTER_CPU_OPERATOR(
FileStoreHandlerCreate,
FileStoreHandlerCreateOp<CPUContext>);
OPERATOR_SCHEMA(FileStoreHandlerCreate)
.NumInputs(0)
.NumOutputs(1)
.SetDoc(R"DOC(
Creates a unique_ptr<StoreHandler> that uses the filesystem as backing
store (typically a filesystem shared between many nodes, such as NFS).
This store handler is not built to be fast. Its recommended use is for
integration tests and prototypes where extra dependencies are
cumbersome. Use an ephemeral path to ensure multiple processes or runs
don't interfere.
)DOC")
.Arg("path", "base path used by the FileStoreHandler")
.Arg("prefix", "prefix for all keys used by this store")
.Output(0, "handler", "unique_ptr<StoreHandler>");
NO_GRADIENT(FileStoreHandlerCreateOp);
} // namespace caffe2