Panda6
July 17, 2024, 1:45am
1
when building tvm with backend qualcomm hexagon V66 architeture met some errors:
error: use of undeclared identifier ‘Q6_Vhf_equals_Vqf16’
error: use of undeclared identifier ‘Q6_Vqf16_vadd_VhfVhf’
error: invalid instruction
asm volatile(" %0 = dmpause" : “=r”(dm0));
error: invalid instruction
asm volatile(" %0 = dmpause" : “=r”(dm0));
Panda6
July 18, 2024, 1:50am
2
Hi @Panda6 , The error shows that fp16 HVX instructions and user dma instructions are not supported in v66 as they were introduced starting from v68 architecture.
@Panda6 I’ve raised the PR #17169 to fix this issue. Please try it out and let me know.
Panda6
July 19, 2024, 6:39am
5
Well done.
Beside this, I’d like to knwn more about tvm integrated with hexagon dsp:
Can TVM outperform snpe and qnn when used with hexagon backend in terms of performance?
Can we use TVM with hexagon backend to deploy a model end-to-end?
How does the quantization process work? Can we directly use the quantization encoding files exported from AIMET tools in TVM?
With the introduction of V75 architecture and its HMX computing unit, does TVM already support it?
Thanks a lot.
Panda6
July 19, 2024, 9:42am
6
I want to build a model end-2-end like:
import numpy as np
import tvm
from tvm import relay, auto_scheduler
import tvm.relay.testing
from tvm.contrib import graph_executor
import os
import tvm.contrib.hexagon as hexagon
import onnx
from tvm.contrib import utils, ndk
onnx_model = onnx.load(“mobilenetv2.onnx”)
path_lib = “./mobilenetv2.so”
os.environ[“TVM_NDK_CC”] = “tools/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++”
mod, params = relay.frontend.from_onnx(onnx_model, {“x”: (1, 3, 224, 224)})
target = tvm.target.hexagon(“v66”, hvx=0)
with tvm.transform.PassContext(opt_level=3):
lib = relay.build(mod, target, params=params)
lib.export_library(path_lib, ndk.create_shared)
But failed:
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
@sanirudh @srkreddy1238 @tqchen @kparzysz