Files
pytorch/caffe2/predictor/predictor_utils.h
Yangqing Jia 0a809fc8b1 build changes to make cpu unified build working. (#10504)
Summary:
Properly annotated all apis for cpu front. Checked with cmake using

cmake -DUSE_ATEN=ON -DUSE_CUDA=OFF -DBUILD_ATEN=ON

and resulting libcaffe2.so has about 11k symbols.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10504

Reviewed By: ezyang

Differential Revision: D9316491

Pulled By: Yangqing

fbshipit-source-id: 215659abf350af7032e9a4b0f28a856babab2454
2018-08-15 17:22:36 -07:00

24 lines
631 B
C++

#pragma once
#include "caffe2/core/db.h"
#include "caffe2/core/workspace.h"
#include "caffe2/proto/metanet.pb.h"
namespace caffe2 {
namespace predictor_utils {
CAFFE2_API const NetDef getNet(const MetaNetDef& def, const std::string& name);
CAFFE2_API std::unique_ptr<MetaNetDef> extractMetaNetDef(
db::Cursor* cursor,
const std::string& key);
// Extract the MetaNetDef from `db`, and run the global init net on the
// `master` workspace.
CAFFE2_API std::unique_ptr<MetaNetDef> runGlobalInitialization(
std::unique_ptr<db::DBReader> db,
Workspace* master);
} // namespace predictor_utils
} // namespace caffe2