提交 ba32360a 编写于 作者: M Megvii Engine Team

feat(lite): add set opencl buffer kernel cache lite api

GitOrigin-RevId: 06052182380ab11854df9ba31f50d2ad3439f692
上级 711b5bf5
......@@ -13,6 +13,7 @@ ModelLite::ModelLite(const std::string& path) : model_path(path) {
void ModelLite::load_model() {
m_network = std::make_shared<lite::Network>(config, IO);
if (enable_layout_transform) {
LITE_WARN("enable layout transform while load model for lite");
lite::Runtime::enable_global_layout_transform(m_network);
}
if (share_model_mem) {
......
......@@ -60,8 +60,8 @@ public:
std::vector<uint8_t> get_model_data() override;
private:
bool share_model_mem;
bool enable_layout_transform;
bool share_model_mem = false;
bool enable_layout_transform = false;
std::string model_path;
DataParser parser;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册