[Bug][TIRx][S-TIR] LoopPartition fails when unrolling an int64 loop with extent one`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Start by running the reproducer in the issue, which calls s_tir.transform.LoopPartition with partition_const_loop=True on an int64 loop of extent one. The failing check is a structural type-equality assertion that fails when substituting i:T.int64 with 0:T.int32, so look at where LoopPartition substitutes the loop variable with its constant bound. Done means the reproducer runs without the InternalError and the loop variable keeps its integer type, and the existing int32 behaviour is unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Thanks for participating in the TVM community! We use https://discuss.tvm.apache.org/ for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first 😸
Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.
Expected behavior
s_tir.transform.LoopPartition should successfully partition this well-formed function when partition_const_loop=True, preserving the loop variable's integer type or otherwise handling the unit-extent loop without an internal error.
Actual behavior
The input passes tirx.analysis.verify_well_formed, but applying LoopPartition raises:
InternalError: Check failed: (ffi::StructuralEqual()(ret.value()->ty, var->ty)) is false: substituting i:T.int64 -> 0:T.int32
Changing the loop variable and bounds to int32 makes the same pass invocation succeed.
Environment
Operating System: Ubuntu 26.04.1 LTS (WSL2), x86_64
Python: 3.10.22
Build: local LLVM build (21.1.8)
TVM version: 0.26.0
Steps to reproduce
import tvm
from tvm import tirx
from tvm.script import tirx as T
@T.prim_func(s_tir=True)
def main(A: T.Buffer((2,), "float32"), B: T.Buffer((2,), "float32")):
for i in T.serial(T.int64(2)):
if T.likely(i < T.int64(1)):
B[i] = A[i]
else:
B[i] = A[i]
assert tirx.analysis.verify_well_formed(main)
mod = tvm.IRModule({"main": main})
with tvm.transform.PassContext(
config={"s_tir.LoopPartition": {"partition_const_loop": True}}
):
tvm.s_tir.transform.LoopPartition()(mod)
Triage
Please refer to the list of label tags here to find the relevant tags and add them below in a bullet format (example below).
- needs-triage
- Ngôn ngữ chính
- Python
- Star
- 13.9k
- Fork
- 4k
- Merge trung bình
- 8 giờ 5 phút
- Pull request đã merge (30 ngày)
- 170
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/tvm
-
needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] [Relax][ONNX] OneHot does not convert floating-point depth to int64Có thể đã có người làm @tandede đã nhận 2 ngày trước. Đang mởneeds-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug][Relax] ReorderTakeAfterMatmul fails on vector dot productsCó thể đã có người làm @hiyufan đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/tvm#20595 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
area/test type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Clodmony/starship-coop#70 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
punitarani/fli#270 ·
-
🐛 Bug 🔔 Pending processing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
jumpserver/jumpserver#17980 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Claiming namespace `prodmetrics`Đang mởnamespace
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
EclipseFdn/open-vsx.org#15341 ·
Maintainer thường phản hồi trong vòng 1 ngày