mirror of
https://github.com/tile-ai/tilelang.git
synced 2026-10-21 06:40:23 +08:00
LowerSharedBarrier lowers T.alloc_barrier() to hardware mbarrier code (the cutlass Barrier type, tl::tl_shuffle_elect, tl::fence_barrier_init), all of which only exist on sm_90+. On pre-Hopper targets (e.g. sm_86) the frontend accepted the call silently and nvcc later failed with cryptic "identifier 'Barrier' is undefined" / "namespace 'tl' has no member ..." errors. Add a static compute-capability guard in CUDAPassPipelineBody, before LowerSharedBarrier: if the target is < sm_90 and the module uses a shared barrier, raise a clear ValueError naming the offending primitives and pointing to __syncthreads()/named barriers as the pre-Hopper alternative. Fixes the sm_86 alloc_barrier compile crash. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>