Caffe2 - C++ API
A deep learning, cross platform ML framework
no_default_engine_op.h
1 #ifndef CAFFE2_OPERATORS_NO_DEFAULT_ENGINE_OP_H_
2 #define CAFFE2_OPERATORS_NO_DEFAULT_ENGINE_OP_H_
3 
4 #include "caffe2/core/context.h"
5 #include "caffe2/core/logging.h"
6 #include "caffe2/core/operator.h"
7 
8 namespace caffe2 {
9 
18 template <class Context>
19 class NoDefaultEngineOp final : public Operator<Context> {
20  public:
21  USE_SIMPLE_CTOR_DTOR(NoDefaultEngineOp);
22  USE_OPERATOR_CONTEXT_FUNCTIONS;
23 
24  bool RunOnDevice() override {
25  CAFFE_THROW(
26  "The operator ",
27  this->debug_def().type(),
28  " does not have a default engine implementation. Please "
29  "specify an engine explicitly for this operator.");
30  }
31 };
32 
33 } // namespace caffe2
34 
35 #endif // CAFFE2_OPERATORS_NO_DEFAULT_ENGINE_OP_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
A helper class to denote that an op does not have a default engine.