Commit d7cc78a6 by WolffyChen Committed by Tianqi Chen

Update deploy.md (#223)

* Update deploy.md

Add an example in c++.

* Update deploy.md

Add an example in c++.

* Update deploy.md

Add an example in c++.

* Update deploy.md

Add an example in c++.

* Update deploy.md

Update dlpack device and type enumerations.
parent 90e4dd6e
...@@ -67,15 +67,15 @@ int main() ...@@ -67,15 +67,15 @@ int main()
params_arr.data = params_data.c_str(); params_arr.data = params_data.c_str();
params_arr.size = params_data.length(); params_arr.size = params_data.length();
// get global function module for graph runtime int dtype_code = kDLFloat;
tvm::runtime::Module mod = (*tvm::runtime::Registry::Get("tvm.graph_runtime.create"))(json_data, mod_dylib, 1, 0);
int dtype_code = kFloat;
int dtype_bits = 32; int dtype_bits = 32;
int dtype_lanes = 1; int dtype_lanes = 1;
int device_type = kCPU; int device_type = kDLCPU;
int device_id = 0; int device_id = 0;
// get global function module for graph runtime
tvm::runtime::Module mod = (*tvm::runtime::Registry::Get("tvm.graph_runtime.create"))(json_data, mod_syslib, device_type, device_id);
DLTensor* x; DLTensor* x;
int in_ndim = 4; int in_ndim = 4;
int64_t in_shape[4] = {1, 3, 224, 224}; int64_t in_shape[4] = {1, 3, 224, 224};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment