I want to save tvm(tensorrt-runtime) model as a tensorrt engine file, and then load the file in tensorrt.
So I set env_variable TVM_TENSORRT_CACHE_DIR
, and model saved as tvmgen_default_tensorrt_main_0_fp32.meta
and tvmgen_default_tensorrt_main_0_fp32.plan
, but the size of tvmgen_default_tensorrt_main_0_fp32.plan
is 3.3K.
The saved engine file (*.plan) appears to only contain structure and no parameters saved.
(base) root@e1b8a559bf1a:~/model_tvm/TVM_TENSORRT_CACHE_DIR# ll -ah
total 16K
drwxr-xr-x 2 root root 4.0K Feb 15 17:59 ./
drwxrwxrwx 3 root root 4.0K Feb 15 20:25 ../
-rw-r--r-- 1 root root 88 Feb 15 17:57 tvmgen_default_tensorrt_main_0_fp32.meta
-rw-r--r-- 1 root root 3.3K Feb 15 17:57 tvmgen_default_tensorrt_main_0_fp32.plan
How can I save the structure and parameters in one engine file?