pytorch  1.8.2
About: PyTorch provides Tensor computation (like NumPy) with strong GPU acceleration and Deep Neural Networks (in Python) built on a tape-based autograd system. LTS (Long Term Support) release.
  Fossies Dox: pytorch-1.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ios_caffe_predictor.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <string>
5#include "caffe2/core/net.h"
8
9struct Tensor {
10 std::vector<int64_t> dims;
11 uint8_t* data;
12};
13
15 public:
16 /**
17 @allowMetalOperators Allow converting eligible operators to Metal GPU framework accelerated
18 operators. Setting this flag to true doesn't guarantee predictor will be using Metal operators;
19 Client code must check usingMetalOperators flag to determine predictor is using them.
20 */
21 static Caffe2IOSPredictor* NewCaffe2IOSPredictor(const caffe2::NetDef& init_net,
22 const caffe2::NetDef& predict_net,
23 bool disableMultithreadProcessing,
24 bool allowMetalOperators);
25 void run(const Tensor& inData, Tensor& outData, std::string& errorMessage);
27
29
30 private:
31 Caffe2IOSPredictor(const caffe2::NetDef& init_net,
32 const caffe2::NetDef& predict_net,
33 bool disableMultithreadProcessing,
34 bool usingMetalOperators);
36};
caffe2::Predictor predictor_
const bool usingMetalOperators
#define IOS_CAFFE_EXPORT
std::vector< int64_t > dims
uint8_t * data