Skip to content

TVM FFI Error with flashinfer-python==0.4.0 #1913

@trevor-m

Description

@trevor-m

After upgrading from flashinfer-python 0.4.0rc3 to 0.4.0, I'm getting this error when trying to use Sglang. It appears to occur during DeepGemm JIT.

Traceback (most recent call last):
  File "./dlfcn/dlopen.c", line 81, in ___dlopen
  File "./dlfcn/dlopen.c", line 71, in dlopen_implementation
  File "./dlfcn/dlerror.c", line 138, in _dlerror_run
  File "./elf/dl-error-skeleton.c", line 227, in __GI__dl_catch_error
  File "./elf/dl-error-skeleton.c", line 208, in __GI__dl_catch_exception
  File "./dlfcn/dlopen.c", line 56, in dlopen_doit
  File "./elf/dl-open.c", line 883, in _dl_open
  File "./elf/dl-error-skeleton.c", line 208, in __GI__dl_catch_exception
  File "./elf/dl-open.c", line 771, in dl_open_worker
  File "./elf/dl-open.c", line 808, in dl_open_worker
  File "./elf/dl-error-skeleton.c", line 182, in __GI__dl_catch_exception
  File "./elf/dl-init.c", line 117, in _dl_init
  File "./elf/dl-init.c", line 33, in call_init
  File "./elf/dl-init.c", line 70, in call_init
  File "<unknown>", line 0, in _GLOBAL__sub_I_analyzer.cc
  File "<unknown>", line 0, in tvm::ffi::NDArrayObj::_GetOrAllocRuntimeTypeIndex()
  File "<unknown>", line 0, in TVMFFITypeGetOrAllocIndex
  File "src/ffi/object.cc", line 133, in tvm::ffi::TypeTable::GetOrAllocTypeIndex(tvm::ffi::String, int32_t, int32_t, int32_t, bool, int32_t)::<lambda()>
InternalError: Check failed: (type_table_[static_type_index] == nullptr) is false: Conflicting static index 72 between ffi.Map and ffi.NDArray

Repro

docker run --gpus all \
    --shm-size 32g \
    -p 30000:30000 \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    --env "HF_TOKEN=<secret>" \
    --ipc=host \
    lmsysorg/sglang:latest \
    python -m sglang.launch_server --model deepseek-ai/DeepSeek-V3.2-Exp --tp 8 --dp 8 --enable-dp-attention --host 0.0.0.0 --port 30000

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions