apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.46k stars 3.41k forks source link

[SVE] Use only powers of two as possible vscale values #17001

Closed lhutton1 closed 2 months ago

lhutton1 commented 2 months ago

When analyzing scalable expressions, the analyzer will iterate over a series of known vscale values in the range 1-16. However, we can tighten this range to only values that are a power of two, as stated in the LLVM lang ref and more generally the reference manual.

This comes from a discussion in https://github.com/apache/tvm/pull/16921#discussion_r1600048788

lhutton1 commented 2 months ago

cc @ekalda @Anndrey24

lhutton1 commented 2 months ago

Credit here is to @Anndrey24 ;)