/usr/local/lib64/python3.6/site-packages/torch/include/caffe2/opt
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/caffe2/opt/glow_net_transform.h (1625B)
#pragma once
#include
#include
#include
#include
#include
#include
#include
C10_DECLARE_string(onnxifi_blacklist);
C10_DECLARE_string(onnxifi_blacklist_ops);
namespace caffe2 {
namespace glow {
/// Onnxifi transformation on the net and workspace. We also
/// needed the input data/shape to populate the shape. In addition, we take a \p
/// blocklist to control and mask what ops we want to consider in onnxifi
/// process. We can also set whether to use ONNX proto or C2 proto through
/// ONNXIFI interface.
void onnxifi(
NetDef* net,
Workspace* ws,
const std::vector& input_names,
const std::vector& output_names,
const std::vector& weight_names,
const std::unordered_set& blocklist,
const ShapeInfoMap& shape_hints_max_bs,
bool use_onnx,
size_t max_batch_size = 0,
size_t max_seq_size = 0,
bool load_model_by_blob = false,
bool predictor_net_ssa_rewritten = false,
const std::unordered_map &shape_hints_per_bs = {},
const c10::optional &blacklist_ops = c10::nullopt,
const c10::optional &min_ops = c10::nullopt,
const std::unordered_set &blocklist_blobs = {},
const c10::optional & verify_only_single_subnet = c10::nullopt);
std::unordered_set ParseNetPositionList(const std::string& str);
std::unordered_set ParseBlockListOps(const std::string& str);
} // namespace glow
} // namespace caffe2