Skip to content

AttributeError: module 'tilelang.transform._ffi_api' has no attribute 'WarpSpecializedPipeline' #306

@JustinJin04

Description

@JustinJin04

After building BitBLAS from source according to the documentation, I tried to run the example code from quick start and encountered the problem mentioned in title.

Environment:

Docker Image: nvcr.io/nvidia/pytorch:23.01-py3

GPU: NVIDIA H100 (sm_90)

CUDA Version: 12.0.140

Driver Version: 570.86.15

GLIBC Version: 2.31

Python Version: 3.8.10

BitBLAS Commit: 0c51e34

Error log:

2025-06-04 06:28:11  [TileLang:tilelang.env:WARNING]: Composable Kernel is not installed or found in the expected path
2025-06-04 06:28:14 [BitBLAS:WARNING]: TVM target not found. Please set the TVM target environment variable using `export TVM_TARGET=<target>`, where <target> is one of the available targets can be found in the output of `tools/get_available_targets.py`.
2025-06-04 06:28:14 [BitBLAS:INFO]: Auto detected target: cuda
2025-06-04 06:28:14 [BitBLAS:WARNING]: Hopper architecture is not supported for dequantize
[06:28:20] /zhan/BitBLAS/3rdparty/tilelang/src/transform/warp_specialized_rewriter.cc:1114: Warning: WarpSpecialize will be disabled because the program uses thread tags other than threadIdx.x
If you want to use warp specialization, please refactor your program to use threadIdx.x only
Lowering result:
Module(llvm, f6823c8)
Traceback (most recent call last):
  File "/zhan/flashinfer_profiler/examples/bitblas/test.py", line 24, in <module>
    matmul = bitblas.Matmul(config=matmul_config)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/ops/general_matmul/__init__.py", line 391, in __init__
    self.dispatch(target, from_database, source_format, enable_tuning)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/ops/general_matmul/__init__.py", line 410, in dispatch
    self._build_default_module(target)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/ops/operator.py", line 286, in _build_default_module
    self._build_runtime_module(target)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/ops/operator.py", line 230, in _build_runtime_module
    wrapped_source = self.wrapper.wrap(
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/builder/wrapper/tl.py", line 420, in wrap
    wrapper = wrapper_class(self.scheduled_ir_module, c_source, self.arch)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/builder/wrapper/tl.py", line 46, in __init__
    self.parse_source_information()
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/builder/wrapper/tl.py", line 52, in parse_source_information
    device_mod = get_annotated_device_mod(self.mod, self.arch.target, backend=self.backend)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/utils/rtmod_analysis.py", line 120, in get_annotated_device_mod
    return get_annotated_device_mod_from_tl(mod, target)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/utils/rtmod_analysis.py", line 26, in get_annotated_device_mod_from_tl
    mod = tilelang.transform.WarpSpecializedPipeline()(mod)
  File "/zhan/bitblas_env/lib/python3.8/site-packages/bitblas/3rdparty/tilelang/tilelang/transform/__init__.py", line 96, in WarpSpecializedPipeline
    return _ffi_api.WarpSpecializedPipeline()  # type: ignore
AttributeError: module 'tilelang.transform._ffi_api' has no attribute 'WarpSpecializedPipeline'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions