Caffe2 - C++ API
A deep learning, cross platform ML framework
onnxifi_init.cc
1 #include "caffe2/onnx/onnxifi_init.h"
2 
3 #include <mutex>
4 
5 #include "caffe2/core/logging.h"
6 
7 namespace caffe2 {
8 namespace onnx {
9 
10 onnxifi_library* initOnnxifiLibrary() {
11  static std::once_flag once;
12  static onnxifi_library core{};
13  std::call_once(once, []() {
14  auto ret = onnxifi_load(ONNXIFI_LOADER_FLAG_VERSION_1_0, nullptr, &core);
15  if (!ret) {
16  CAFFE_THROW("Cannot load onnxifi lib");
17  }
18  });
19  return &core;
20 }
21 } // namespace onnx
22 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13