Closed wrongtest-intellif closed 3 years ago
Thanks @wrongtest for reporting the issue, can you help to suggest a fix and send a PR?
also cc @vinx13 @masahi who can help manage the related PRs
Hi, there is a fix at https://github.com/apache/tvm/pull/8338. @tqchen @vinx13 @masahi
Hi there, we are working on vectorized computation in some tagged storage scope. We encountered the problem on vectorize: The example is as below:
Here we use tagged storage scope, thus
A
,B
,C
can be merge into single bufferMerged
andA
andC
share same region:A
->Merged[0: 1024]
B
->Merged[1024; 2048]
C
->Merge[0: 1024]
It seems that after buffer merging and buffer index remap, the ramp node is incorrectly rewrite to
ramp(origin + 1, 1, 1024)
instead oframp(origin + 1024, 1, 1024)
The related implementation seems to be here: https://github.com/apache/tvm/blob/main/src/tir/transforms/storage_rewrite.cc#L507-L512 where the offset is divided by a factor of datatype lanes (in our case, 1024)
The code to reproduce the problem is as below: