Problem about Hexagon HVX support

Recently, I want to utilize HVX instructions when generating assemblys for Hexagon.

While I noticed the description in the TVM target, that floating point support in HVX requires LLVM 14+. image

My LLVM version is 12.0.1, and HVX support for int is really no problem, as I can see instructions like vmpyie in assembly.

However, even I update my LLVM to 14.0.6, HVX support for floating points still seems not implemented? I still don’t see any HVX instructions in the generated assemblys.

Was it because I missed sth. for the target?

The cpu_ver in the target must be at least v68. Could you show how you construct the target (i.e. the parameters)?

I construct the target by the following:

target ='v68', link_params=True, hvx=128)

I have also tried to set use_qfloat and use_ieee to true, but it doesn’t seem to bring any change.

BTW, do you have any documents on using hvx for reference?

There shouldn’t be anything additional required. Are you using vectorize in your schedule, or are you relying on auto-vectorization in LLVM?

I’m relying on auto-vectorization in LLVM.

Could you try compiling for ‘v69’ instead, just to see if HVX code is generated?

Sorry. Forgot to reply.

I think the problem is because there are no instructions for floating point in HVX yet.

For example, there is sfmpy in Hexagon but no vfmpy in HVX.

So after I quantize the floating point to fixed point, everything is ok.

I don’t know if this is the way you were intended, but it works.

BTW, I’ve also tried with target ‘v69’, and no HVX instruction was generated.