XYZboom opened a new issue, #20118:
URL: https://github.com/apache/tvm/issues/20118
### Expected behavior
`relax.build(mod, target="cuda")` should compile successfully for any valid
Relax IR module, including a GEMV pattern (`multiply` + `sum` with a dataflow
block). The compiled module should execute and produce correct results.
### Actual behavior
`relax.build` crashes with a `ScheduleError` during the CUDA dlight GPU
scheduling pass:
```
ScheduleError: An error occurred in the schedule primitive 'fuse'.
The IR with diagnostic is:
...
Error message: The loops can't be fused because the inner loop tirx.For#1 is
not the only child of outer loop tirx.For#0.
```
### Environment
- **OS**: Linux (x86_64, conda environment)
- **GPU**: NVIDIA GeForce RTX 3080 Ti (12GB VRAM, CUDA 580.76.05)
- **TVM version**: 0.25.0.post1
- **Target**: `cuda` (GPU compilation)
- **Python**: 3.12
### Steps to reproduce
```python
import tvm
from tvm import relax
from tvm.script import ir as I
from tvm.script import relax as R
@I.ir_module
class Module:
@R.function
def main(
v_0: R.Tensor((2, 2), dtype="float32"),
v_1: R.Tensor((2,), dtype="float32"),
) -> R.Tensor((2,), dtype="float32"):
with R.dataflow():
lv: R.Tensor((2, 2), dtype="float32") = R.multiply(v_0, v_1)
gv: R.Tensor((2,), dtype="float32") = R.sum(lv, axis=[1],
keepdims=False)
R.output(gv)
return gv
# Crashes here during CUDA build
ex = relax.build(Module, target="cuda")
```
### Triage
* backend:cuda
* needs-triage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]