apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.46k stars 3.41k forks source link

[Bug][Meta-schedule][tensorizing] BERT Meta-schedule tensorizing Runtime Error #17002

Open SharynHu opened 2 months ago

SharynHu commented 2 months ago

I was tensorizing BERT using meta schedule and get a runtime error.

Expected behavior

It should

Actual behavior

Raised a runtime error duing task tuning "fused_batch_matmul"

E       RuntimeError: parallel_for_dynamic error with [11:05:35] ~/tvm/src/tir/transforms/unify_thread_binding.cc:112: Check failed: (ana.CanPro
veEqual(dom->extent, new_iter_var->dom->extent)) is false: ValueError: All loops that are bound to `threadIdx.y` should have the same extent. However, there are two
 loops with extent T.int64(32) and T.int64(16), which are not equal

Environment

Hardware: Nvidia/rtx-3060 OS: ubuntu 2204 Commit id: cfe1711934f82e56f147f2f5f9f928b5a9b92b3e Cuda: 11.8 Llvm: 17

Steps to reproduce

Simply run the official test code located at ~/tvm/tests/python/integration/test_auto_tensorize.py

Triage