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] LoweringException: RuntimeError: Cannot find a valid mapping for Clip model with batch size > 1 #252
Fixed in #293. The CLIP vision backbone now runs with batch > 1 and matches the CPU reference end to end (max abs diff ~1e-5).
The Cannot find a valid mapping came from the conv tile-mapping search, not the conv itself. A CLIP ViT-B/32 patch embedding is a Conv2d(3, 768, kernel_size=32, stride=32); at batch > 1 it routes to conv_multi_tile_mapping, which collects all SPAD-fitting tiles into tile_candidates (and returns them) but guarded the error on a separate max_used_spad_size counter. That counter only advances for the full-kernel (k_h == K_H) tile, which overflows SPAD once the batch is large enough — so it raised even though smaller-k_h tiles fit and were already collected. The guard now checks tile_candidates directly, so a conv is rejected only when no tile fits at all.
A CLIPVisionModel test (tests/models/test_clip.py) and a batched patch-conv case in test_conv2d.py were added, and CLIP is now listed in the README model coverage.
Activity
YWHyuk commentedon Jul 9, 2026
Fixed in #293. The CLIP vision backbone now runs with
batch > 1and matches the CPU reference end to end (max abs diff ~1e-5).The
Cannot find a valid mappingcame from the conv tile-mapping search, not the conv itself. A CLIP ViT-B/32 patch embedding is aConv2d(3, 768, kernel_size=32, stride=32); atbatch > 1it routes toconv_multi_tile_mapping, which collects all SPAD-fitting tiles intotile_candidates(and returns them) but guarded the error on a separatemax_used_spad_sizecounter. That counter only advances for the full-kernel (k_h == K_H) tile, which overflows SPAD once the batch is large enough — so it raised even though smaller-k_htiles fit and were already collected. The guard now checkstile_candidatesdirectly, so a conv is rejected only when no tile fits at all.A
CLIPVisionModeltest (tests/models/test_clip.py) and a batched patch-conv case intest_conv2d.pywere added, and CLIP is now listed in the README model coverage.[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)
[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)
[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)
[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)
[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)
[Frontend] Fix conv mapping rejecting batched large-kernel convs
[Model] Enable CLIP vision backbone (issue #252)