mlc-ai / relax

Apache License 2.0
140 stars 70 forks source link

[Bug] dlight decode-gemv generating incorrect schedule #267

Closed psrivas2 closed 11 months ago

psrivas2 commented 1 year ago

the unit test test_decode_gemv_4 in dlight branch fails to build if I try to compile it using tvm.build(mod, target) at the end of the test case.

It throws the error: ValueError: Check failed: n_deepest_reduction_loops == reduction_loops.size() (0 vs. 1) : Cross-thread reduction requires all the reduction-related loops to be the deepest among all statements outside the desired block. However, block matmul needs cross-thread reduction, while the reduction-related loops outside of it are not the deepest statements, which violates the condition.

cc @zxybazh

zxybazh commented 1 year ago

Here's a reproducible script https://gist.github.com/zxybazh/39d1bc9722bdbe30769f9efd4075c9cf

zxybazh commented 1 year ago

CC: @spectrometerHBH @junrushao would you please confirm if this check failure is expected?

MasterJH5574 commented 1 year ago

https://github.com/apache/tvm/pull/15340 fixes this I think.