loopyt 45c634fc40 feat(ops): let the package import on a host that has only Triton
The point of the Triton backend is to run where TileLang cannot, but importing `deepinfer`
pulled the whole TileLang stack in regardless. Three separate leaks:

1. `ops.py` imported the platform default backend even when another one was selected, purely
   to have fallbacks available. That default is TileLang, so it dragged in `tile_kernels`.
   `DEEPINFER_OPS_STRICT=1` now skips it: no default import, no fallback, a missing kernel
   raises. That is the right trade when the default is not installed, or when a silent
   fallback would hide an incomplete port.
2. `tile_kernels` sat at module scope in `norm`, `cache_common`, `fused_transform` and
   `load_paged_kv_cache`, but only the reference implementations and the unit tests use it.
   The kernels never do. It now lives inside those functions.
3. `tilelang` itself: `compress` set a TileLang pass flag, and `norm` needed a TileLang dtype
   handle to pass along a parameter the Triton factory discards. Both now degrade to a no-op
   or a plain string when TileLang is absent.

Verified on a FlagTree image (torch 2.11, triton 3.6, no TileLang): `import` succeeds, 19
kernels build and run, and the outputs are element-wise identical to the same kernels built
by triton 3.5.1 and 3.7.1. Full A/B on the reference image is still green, so nothing
changed for the paths that do have TileLang.
2026-10-22 10:53:30 +08:00
..
asc initial commit 2026-10-20 12:09:42 +08:00
cuda initial commit 2026-10-20 12:09:42 +08:00
triton fix(triton): delegate the sampler's verify variant instead of asserting 2026-10-22 09:10:45 +08:00
__init__.py initial commit 2026-10-20 12:09:42 +08:00
cache_common.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
candidate_blocks.py initial commit 2026-10-20 12:09:42 +08:00
common.py initial commit 2026-10-20 12:09:42 +08:00
compress.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
compute_seqlens_k_zos.py initial commit 2026-10-20 12:09:42 +08:00
conftest.py initial commit 2026-10-20 12:09:42 +08:00
dflash_copy.py initial commit 2026-10-20 12:09:42 +08:00
dflash.py initial commit 2026-10-20 12:09:42 +08:00
flash_mla_utils.py initial commit 2026-10-20 12:09:42 +08:00
fused_sample.py feat(ops): report fallbacks at use time, and record why the sampler stays put 2026-10-22 08:05:05 +08:00
fused_transform.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
gather_engram_tokens_zos.py initial commit 2026-10-20 12:09:42 +08:00
gather_input_ids_zos.py initial commit 2026-10-20 12:09:42 +08:00
gather.py initial commit 2026-10-20 12:09:42 +08:00
get_kv_index.py initial commit 2026-10-20 12:09:42 +08:00
image_embed_ops.py initial commit 2026-10-20 12:09:42 +08:00
kv_index_cat.py initial commit 2026-10-20 12:09:42 +08:00
load_paged_kv_cache.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
norm.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
ops.py feat(ops): let the package import on a host that has only Triton 2026-10-22 10:53:30 +08:00
outlier_detection.py initial commit 2026-10-20 12:09:42 +08:00
prepare_cp_mirror.py initial commit 2026-10-20 12:09:42 +08:00
prepare_v4_decode_metadata.py initial commit 2026-10-20 12:09:42 +08:00
random_sampling.py initial commit 2026-10-20 12:09:42 +08:00
sampler.py initial commit 2026-10-20 12:09:42 +08:00
schedule_mtp_varlen.py initial commit 2026-10-20 12:09:42 +08:00
state_cache.py initial commit 2026-10-20 12:09:42 +08:00
store_kv_cache.py initial commit 2026-10-20 12:09:42 +08:00
store_mtp_info.py initial commit 2026-10-20 12:09:42 +08:00
structure_output.py initial commit 2026-10-20 12:09:42 +08:00
sum_smaller_probs.py initial commit 2026-10-20 12:09:42 +08:00
swa_index.py initial commit 2026-10-20 12:09:42 +08:00