YOLO-Training-Optimization-Pose-Estimation-and-Tracking
YOLO-Training-Optimization-Pose-Estimation-and-Tracking copied to clipboard
Optimize yolov8 with Apache TVM
Hello, Did you succeed to optimize yolov8 with tvm? I see your yolov8_tvm.ipynb is empty...
When I try to compile it and run it with tvmc I get this error:
TVMError: Assert fail: T.tvm_struct_get(p0, 0, 10, "int32") == 4, Argument tvmgen_default_fused_nn_conv2d_add_sigmoid_multiply.p0.device_type has an unsatisfied constraint: 4 == T.tvm_struct_get(p0, 0, 10, "int32")
My code is the following:
import os
import sys
import tvm
from tvm.driver import tvmc`
model = tvmc.load(model_file) # using a .onnx file exported from ultralytics
soc = 'rk3588'
gpu_target = tvm.target.mali(model=soc)
target_host = tvm.target.arm_cpu(model=soc)
target = tvm.target.Target(target=gpu_target, host=target_host)
package = tvmc.compile(model, target=str(target))
result = tvmc.run(package, device="cpu")
print(result)