tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[SVE] Implement scalable vectors in TVM

Open ekalda opened this issue 1 year ago • 2 comments
trafficstars

This prototype is to accompany the open SVE RFC. It implements the design outlined in the RFC.

The main changes to the stack include:

  1. tir.split can accept an expression with vscale as a factor

  2. LoopVectorizer can create Ramp and Broadcast nodes with scalable lanes

  3. BufferLoad and BufferStore nodes can accept an optional predicate which is created in LoopVectorizer

  4. LLVM codegen can lower the scalable predicated vectors into llvm.masked.* intrinsics

The prototype is currently missing tir.tile ~and TVMScript parser support for predicates~.

ekalda avatar Jan 04 '24 10:01 ekalda

  1. tir.split can accept an expression with vscale as a factor
  2. LoopVectorizer can create Ramp and Broadcast nodes with scalable lanes
  3. BufferLoad and BufferStore nodes can accept an optional predicate which is created in LoopVectorizer
  4. LLVM codegen can lower the scalable predicated vectors into llvm.masked.* intrinsics

The prototype is currently missing tir.tile and TVMScript parser support for predicates.

Hi @ekalda ,

Very nice work !

I can't comment much, I think this implementation is a careful step toward SVE. Will test this on some RVV CPU implementation to see a walk through the LLVM masked.* things.

cbalint13 avatar Jan 04 '24 13:01 cbalint13

@tvm-bot rerun

ekalda avatar Jan 10 '24 10:01 ekalda