-
Notifications
You must be signed in to change notification settings - Fork 357
[Dev][jit] Introduce jit for kernel functions #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1. Overall Flowdef matmul(...):
# 1) Derive A, B, C shapes from user parameters
# 2) Use tilelang.language as T to write the kernel function "main"
@tilelang.jit(
out_idx=-1, # create the output tensor at runtime
)
@T.prim_func
def main(
A: T.Buffer(A_shape, in_dtype),
B: T.Buffer(B_shape, in_dtype),
C: T.Buffer((M, N), out_dtype),
):
# TileLang DSL: T.Kernel, T.alloc_shared, T.gemm, T.copy, etc.
...
return main # returns the compiled kernel
When 2. Running the GEMM:
|
* README.md fixed * update test ci
This pull request includes several updates to the
README.md,docs/Installation.md, and various other files to improve documentation, update repository URLs, and introduce new functionality. The most important changes include adding a new section to the README, updating repository URLs, and adding new JIT compilation functionality.Documentation updates:
README.md: Added a "Latest News" section announcing the open-source release oftile-lang.README.md: Added a new benchmark image for Dequantize Matmul Performance on A100.Repository URL updates:
README.md,docker/Dockerfile.cu120,docker/README.md,docs/Installation.md,setup.py: Updated repository URLs fromhttps://github.com/microsoft/TileLangtohttps://github.com/TileLang/tile-lang. [1] [2] [3] [4] [5]Code enhancements:
tilelang/jit/__init__.py: Added new JIT compilation functionality, allowing TileLang PrimFunc to be JIT-compiled into a runnable kernel adapter using TVM.testing/python/jit/test_tilelang_jit_gemm.py: Introduced a new test file for JIT compilation, including a GEMM kernel and a test function to validate its performance.