File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ namespace caffe2 {
12
12
namespace opt {
13
13
14
14
// Mapping from fp32 ops to fakefp16 ops
15
- std::unordered_map<std::string, std::string> getFakeFp16OpMapping (
15
+ CAFFE2_API std::unordered_map<std::string, std::string> getFakeFp16OpMapping (
16
16
bool use_fp16_acc = false ,
17
17
bool use_nnpi = false );
18
18
Original file line number Diff line number Diff line change 21
21
#include " caffe2/onnx/helper.h"
22
22
#include " caffe2/onnx/onnx_exporter.h"
23
23
#include " caffe2/opt/converter.h"
24
+ #include " caffe2/opt/custom/fakefp16_transform.h"
24
25
#include " caffe2/opt/fusion.h"
25
26
#include " caffe2/opt/mobile.h"
26
27
#include " caffe2/opt/onnxifi_transformer.h"
@@ -1706,6 +1707,9 @@ void addGlobalMethods(py::module& m) {
1706
1707
new_proto.SerializeToString (&out);
1707
1708
return py::bytes (out);
1708
1709
});
1710
+ m.def (" get_fakefp16_mapping" , [](bool use_fp16_acc, bool use_nnpi) {
1711
+ return caffe2::opt::getFakeFp16OpMapping (use_fp16_acc, use_nnpi);
1712
+ });
1709
1713
m.def (
1710
1714
" onnxifi" ,
1711
1715
[](const py::bytes& pred_net_str,
You can’t perform that action at this time.
0 commit comments