[Minor] Enhance JIT kernel and add dev docs (#14570)

This commit is contained in:
DarkSharpness
2025-12-23 22:34:59 +08:00
committed by GitHub
parent d7301c89ba
commit 291f11ae39
13 changed files with 817 additions and 290 deletions

View File

@@ -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()