[Bug] `relax.build` crashes with an `AttributeError` during the dlight GPU scheduling pass
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 112
Description
### Expected behavior
`relax.build(mod, target="cuda")` should compile successfully for any valid Relax IR module containing `relax.op.nn.conv2d`. The compiled module should execute and produce correct convolution results.
### Actual behavior
`relax.build` crashes with an `AttributeError` during the dlight GPU scheduling pass:
```
AttributeError: 'FloorDiv' object has no attribute 'value'
```
### Environment
- **OS**: Linux (x86_64, conda environment)
- **GPU**: NVIDIA GeForce RTX 3080 Ti (12GB VRAM)
- **CUDA driver**: 580.76.05
- **TVM version**: 0.25.0.post1 (installed via pip)
- **Target**: `cuda` (GPU compilation)
- **Python**: 3.12
### Steps to reproduce
```python
from tvm import relax
bb = relax.BlockBuilder()
v = relax.Var("v", relax.TensorStructInfo(
shape=relax.ShapeExpr([1, 1, 3, 10]), dtype="float32"))
w = relax.Var("w", relax.TensorStructInfo(
shape=relax.ShapeExpr([1, 1, 1, 2]), dtype="float32"))
with bb.function("f", [v, w]):
c = bb.emit(relax.op.nn.conv2d(v, w,
strides=[1, 1], padding=[0, 0], dilation=[1, 1], groups=1))
bb.emit_func_output(c)
mod = bb.get()
ex = relax.build(mod, target="cuda")
```
### Triage
* bug
* CUDA
* dlight
* gemv
* conv2d
* needs-triage
* needs-triage
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided Python reproduction with the stated CUDA target and confirm the AttributeError in the dlight GPU scheduling pass. Trace the conv2d scheduling path that accesses FloorDiv and inspect the related tests or entry points. Done means valid Relax conv2d modules compile and execute with correct results instead of raising the AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100