3 #include "caffe2/core/common.h" 4 #include "caffe2/core/logging.h" 5 #include "caffe2/proto/caffe2_pb.h" 6 #include "nomnigraph/Representations/NeuralNet.h" 17 void setOperatorDef(
const caffe2::OperatorDef& opDef);
18 bool hasOperatorDef()
const;
19 const caffe2::OperatorDef& getOperatorDef()
const;
20 caffe2::OperatorDef* getMutableOperatorDef();
22 void setDeviceOption(
const caffe2::DeviceOption& opDef);
23 bool hasDeviceOption()
const;
24 const caffe2::DeviceOption& getDeviceOption()
const;
25 caffe2::DeviceOption* getMutableDeviceOption();
28 void setDevice(std::string device);
29 const std::string getDevice()
const;
30 void setDeviceType(
int device);
31 int getDeviceType()
const;
33 enum class ParallelizationScheme {
40 void setParallelization(ParallelizationScheme,
int num = -1);
41 ParallelizationScheme getParallelizationScheme()
const;
42 int getParallelization()
const;
49 void setComponentLevels(std::vector<std::string> components);
50 std::vector<std::string> getComponentLevels()
const;
56 caffe2::OperatorDef OpDef;
57 bool OpDefExists =
false;
60 int DeviceType = caffe2::DeviceTypeProto::PROTO_CPU;
61 ParallelizationScheme parallelization_scheme_ = ParallelizationScheme::none;
62 int parallelization_ = -1;
65 std::vector<std::string> component_levels_;
Annotations allow for generic manipulation of neural network operations.
Represents a a compute device on which a tensor is located.
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...