1 #ifndef CAFFE2_CORE_NET_GL_H_ 2 #define CAFFE2_CORE_NET_GL_H_ 6 #include "caffe2/core/common.h" 7 #include "caffe2/core/logging.h" 8 #include "caffe2/core/net.h" 9 #include "caffe2/core/registry.h" 10 #include "caffe2/core/tensor.h" 11 #include "caffe2/core/workspace.h" 12 #include "caffe2/proto/caffe2.pb.h" 20 bool first_run_ =
true;
23 std::vector<string> output_blobs_;
25 std::vector<bool> opengl_device_;
27 GLNet(
const std::shared_ptr<const NetDef>& net_def,
Workspace* ws);
28 bool SupportsAsync()
override {
33 const int warmup_runs,
35 const bool run_individual)
override;
43 vector<OperatorBase*> GetOperators()
const override {
44 vector<OperatorBase*> op_list;
45 for (
auto& op : operators_) {
46 op_list.push_back(op.get());
54 bool DoRunAsync()
override {
58 vector<unique_ptr<OperatorBase>> operators_;
60 DISABLE_COPY_AND_ASSIGN(
GLNet);
65 #endif // CAFFE2_CORE_NET_SIMPLE_H_
vector< float > TEST_Benchmark(const int warmup_runs, const int main_runs, const bool run_individual) override
Benchmarks a network.
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...