9 #include "caffe2/core/common.h" 15 static constexpr std::chrono::milliseconds kDefaultTimeout =
16 std::chrono::seconds(30);
17 static constexpr std::chrono::milliseconds kNoTimeout =
18 std::chrono::milliseconds::zero();
26 virtual void set(
const std::string& name,
const std::string& data) = 0;
33 virtual std::string
get(
34 const std::string& name,
35 const std::chrono::milliseconds& timeout = kDefaultTimeout) = 0;
42 virtual int64_t add(
const std::string& name, int64_t value) = 0;
47 virtual bool check(
const std::vector<std::string>& names) = 0;
53 const std::vector<std::string>& names,
54 const std::chrono::milliseconds& timeout = kDefaultTimeout) = 0;
61 :
public std::runtime_error {
63 : std::runtime_error(msg) {}
66 #define STORE_HANDLER_NOT_AVAILABLE(...) \ 67 throw ::caffe2::StoreHandlerNotAvailableException( \ 68 ::c10::str("[", __FILE__, ":", __LINE__, "] ", __VA_ARGS__)); 75 : std::runtime_error(msg) {}
78 #define STORE_HANDLER_TIMEOUT(...) \ 79 throw ::caffe2::StoreHandlerTimeoutException( \ 80 ::c10::str("[", __FILE__, ":", __LINE__, "] ", __VA_ARGS__));
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...