tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Tracking Issue] Scalable Vector Extension (SVE) upstreaming

Open ekalda opened this issue 1 year ago • 4 comments

This issue is to track progress for SVE upstreaming

  • [x] P1. vscale builtin and its support in LLVM codegen - https://github.com/apache/tvm/pull/16484
  • [x] P2. Support for scalable lanes in Ramp and Broadcast nodes and associated changes in runtime::DataType - https://github.com/apache/tvm/pull/16523
  • [x] P3. Support string representation of scalable datatype - https://github.com/apache/tvm/pull/16612
  • [x] P4. LLVM codegen support for scalable vectors - https://github.com/apache/tvm/pull/16696
  • [x] P5. Support for creating scalable vectors from LoopVectorizer - https://github.com/apache/tvm/pull/16782
  • [x] P6. Splitting by vscale dependent expression in tir::split - https://github.com/apache/tvm/pull/16862
  • [x] P7. Splitting by vscale dependent expression in te::split - https://github.com/apache/tvm/pull/16862
  • [x] P8. Predication support in LoopVectorizer and LLVM codegen
    • [x] P8a. get_active_lane_mask intrinsic - https://github.com/apache/tvm/pull/16965
    • [x] P8b. Representation and creation of buffer-level predicates - https://github.com/apache/tvm/pull/16966
  • [ ] P9. Gather load and scatter store support
  • [x] P10. SVE specific conv2d schedule - https://github.com/apache/tvm/pull/16899

ekalda avatar Jan 23 '24 14:01 ekalda

@ekalda Hello! I used the latest code and when I tried relay.build(mod, target=target, params=params), I encountered the following error, TVMError: Can't fetch the lanes of a scalable vector at a compile time. Please tell me how to solve it

MrJungle1 avatar May 20 '24 03:05 MrJungle1

Hi @MrJungle1, yes that sounds like a problem related to the SVE implementation. Can you tell me more about what is in the mod and what is the target you are compiling for? This error is triggered when we try to do a.lanes() for a an object a which dtype is a scalable vector (we should do a.vscale_factor() in this case instead). This error can be triggered from many places in the codebase, so the stack trace that accompanies the error would help to diagnose it.

ekalda avatar May 20 '24 08:05 ekalda

@ekalda Hello, thank you for your reply. My model is an onnx model converted from HIFIGAN. target = "llvm -mtriple=arm64-linux-android -mattr=+neon"

MrJungle1 avatar May 20 '24 08:05 MrJungle1

Could you provide a stack trace?

ekalda avatar May 20 '24 08:05 ekalda