You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] CUDA Check failed: scope != "global" when using argmin #20060
relax.build(mod, target="cuda") should compile successfully for any valid Relax IR module, including relax.op.argmin with any valid input shape. The compiled module should execute and produce correct argmin results.
Actual behavior
relax.build crashes with an InternalError during CUDA codegen:
tvm.error.InternalError: Check failed: scope != "global" (global vs. global) : Cannot allocate global memory when targeting CUDA. You must pass all global arrays as input instead
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
importtvmfromtvmimportrelaxbb=relax.BlockBuilder()
v=relax.Var("x", relax.TensorStructInfo(shape=[1], dtype="float32"))
withbb.function("f", [v]):
out=bb.emit(relax.op.astype(relax.op.argmin(v, axis=-1), dtype="float32"))
bb.emit_func_output(out)
mod=bb.get()
# Crashes here during CUDA codegenex=relax.build(mod, target="cuda")
Activity
XYZboom commentedon Jul 28, 2026
error log:
[Fix][DLight] Localize private scalar reduction buffers (apache#20160)