TVM error when partitioning for dpu and cpu

Hello,

I have encountered an error which I could not resolve. When I use this command in tvm:

mod = partition_for_vitis_ai(mod, params, dpu=target)

I get error :


An error occurred during the execution of TVM. For more information, please see: What do to when encountering TVM Errors — tvm 0.8.dev0 documentation

Check failed: (pf) is false: Failed to find the codegen tool for relay.ext.vitis_ai

for line:

lib = relay.build(mod, target=tvm_target, params=params)

I highly appreciate if you can give suggestions for this error. I want to use DPU and CPU for my model. I have compiled an ran successfully on CPU on Ultra96v2. I need to divide between dpu and cpu.

@jamesjason

It seems like tvm is not built with vitis-ai codegen. While building tvm enable vitis-ai by USE_VITIS_AI ON in config.cmake.

@jamesjason

Also, ensure that you import the vitis-ai target by using from tvm.contrib.target import vitis_ai