[JIT sgl-kernel] Jit support per tensor quant (#15709)

This commit is contained in:
Xiaoyu Zhang
2025-12-25 16:24:37 +08:00
committed by GitHub
parent a89e85e739
commit de2f2880b5
11 changed files with 497 additions and 7 deletions
@@ -0,0 +1,14 @@
import torch
from sglang.jit_kernel.add_constant import add_constant
def main():
c = 1024
src = torch.arange(0, 1024 + 1, dtype=torch.int32).cuda()
dst = add_constant(src, c)
assert torch.all(dst == src + c)
if __name__ == "__main__":
main()