Skip to content

Commit c707108

Browse files
Update docs
1 parent 5301e07 commit c707108

File tree

184 files changed

+10186
-2016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+10186
-2016
lines changed

_sources/autoapi/tilelang/autotuner/tuner/index.rst.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Classes
3434
.. autoapisummary::
3535

3636
tilelang.autotuner.tuner.AutoTuner
37+
tilelang.autotuner.tuner.AutoTuneImpl
3738

3839

3940
Functions
@@ -201,6 +202,120 @@ Module Contents
201202

202203

203204

205+
.. py:class:: AutoTuneImpl
206+
207+
Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ , :py:obj:`_T`\ ]
208+
209+
210+
Abstract base class for generic types.
211+
212+
A generic type is typically declared by inheriting from
213+
this class parameterized with one or more type variables.
214+
For example, a generic mapping type might be defined as::
215+
216+
class Mapping(Generic[KT, VT]):
217+
def __getitem__(self, key: KT) -> VT:
218+
...
219+
# Etc.
220+
221+
This class can then be used as follows::
222+
223+
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
224+
try:
225+
return mapping[key]
226+
except KeyError:
227+
return default
228+
229+
230+
.. py:attribute:: jit_impl
231+
:type: tilelang.jit.JITImpl
232+
233+
234+
.. py:attribute:: warmup
235+
:type: int
236+
:value: 25
237+
238+
239+
240+
.. py:attribute:: rep
241+
:type: int
242+
:value: 100
243+
244+
245+
246+
.. py:attribute:: timeout
247+
:type: int
248+
:value: 100
249+
250+
251+
252+
.. py:attribute:: configs
253+
:type: dict | Callable
254+
:value: None
255+
256+
257+
258+
.. py:attribute:: supply_type
259+
:type: tilelang.TensorSupplyType
260+
261+
262+
.. py:attribute:: ref_prog
263+
:type: Callable
264+
:value: None
265+
266+
267+
268+
.. py:attribute:: supply_prog
269+
:type: Callable
270+
:value: None
271+
272+
273+
274+
.. py:attribute:: rtol
275+
:type: float
276+
:value: 0.01
277+
278+
279+
280+
.. py:attribute:: atol
281+
:type: float
282+
:value: 0.01
283+
284+
285+
286+
.. py:attribute:: max_mismatched_ratio
287+
:type: float
288+
:value: 0.01
289+
290+
291+
292+
.. py:attribute:: skip_check
293+
:type: bool
294+
:value: False
295+
296+
297+
298+
.. py:attribute:: manual_check_prog
299+
:type: Callable
300+
:value: None
301+
302+
303+
304+
.. py:attribute:: cache_input_tensors
305+
:type: bool
306+
:value: False
307+
308+
309+
310+
.. py:method:: __post_init__()
311+
312+
313+
.. py:method:: get_tunner()
314+
315+
316+
.. py:method:: __call__(*args, **kwargs)
317+
318+
204319
.. py:function:: autotune(func = None, *, configs, warmup = 25, rep = 100, timeout = 100, supply_type = tilelang.TensorSupplyType.Auto, ref_prog = None, supply_prog = None, rtol = 0.01, atol = 0.01, max_mismatched_ratio = 0.01, skip_check = False, manual_check_prog = None, cache_input_tensors = False)
205320
206321
Just-In-Time (JIT) compiler decorator for TileLang functions.

_sources/autoapi/tilelang/jit/index.rst.txt

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,21 @@ Attributes
3131
tilelang.jit.logger
3232

3333

34+
Classes
35+
-------
36+
37+
.. autoapisummary::
38+
39+
tilelang.jit.JITImpl
40+
41+
3442
Functions
3543
---------
3644

3745
.. autoapisummary::
3846

3947
tilelang.jit.compile
48+
tilelang.jit.par_compile
4049
tilelang.jit.jit
4150

4251

@@ -65,7 +74,112 @@ Package Contents
6574
:type pass_configs: dict, optional
6675

6776

68-
.. py:function:: jit(func = None, *, out_idx = None, target = 'auto', target_host = None, execution_backend = 'cython', verbose = False, pass_configs = None, debug_root_path = None, compile_flags = None)
77+
.. py:function:: par_compile(funcs, out_idx = None, execution_backend = 'cython', target = 'auto', target_host = None, verbose = False, pass_configs = None, compile_flags = None, num_workers = None, ignore_error = False)
78+
79+
Parallel compile multiple TileLang PrimFunc with TVM and build JITKernels.
80+
:param funcs: The TileLang TIR functions to compile and wrap.
81+
:type funcs: Iterable[tvm.tir.PrimFunc]
82+
:param out_idx: Index(es) of the output tensors to return (default: None).
83+
:type out_idx: Union[List[int], int], optional
84+
:param execution_backend: Execution backend to use for kernel execution (default: "cython").
85+
:type execution_backend: Literal["dlpack", "ctypes", "cython", "nvrtc"], optional
86+
:param target: Compilation target, either as a string or a TVM Target object (default: "auto").
87+
:type target: Union[str, Target], optional
88+
:param target_host: Target host for cross-compilation (default: None).
89+
:type target_host: Union[str, Target], optional
90+
:param verbose: Whether to enable verbose output (default: False).
91+
:type verbose: bool, optional
92+
:param pass_configs: Additional keyword arguments to pass to the Compiler PassContext.
93+
Refer to `tilelang.transform.PassConfigKey` for supported options.
94+
:type pass_configs: dict, optional
95+
96+
97+
.. py:class:: JITImpl
98+
99+
Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ , :py:obj:`_KP`\ , :py:obj:`_T`\ ]
100+
101+
102+
Abstract base class for generic types.
103+
104+
A generic type is typically declared by inheriting from
105+
this class parameterized with one or more type variables.
106+
For example, a generic mapping type might be defined as::
107+
108+
class Mapping(Generic[KT, VT]):
109+
def __getitem__(self, key: KT) -> VT:
110+
...
111+
# Etc.
112+
113+
This class can then be used as follows::
114+
115+
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
116+
try:
117+
return mapping[key]
118+
except KeyError:
119+
return default
120+
121+
122+
.. py:attribute:: func
123+
:type: Callable[_P, _T] | tilelang.language.v2.PrimFunc[_KP, _T]
124+
125+
126+
.. py:attribute:: out_idx
127+
:type: list[int] | int | None
128+
129+
130+
.. py:attribute:: execution_backend
131+
:type: Literal['dlpack', 'ctypes', 'cython']
132+
133+
134+
.. py:attribute:: target
135+
:type: str | tvm.target.Target
136+
137+
138+
.. py:attribute:: target_host
139+
:type: str | tvm.target.Target
140+
141+
142+
.. py:attribute:: verbose
143+
:type: bool
144+
145+
146+
.. py:attribute:: pass_configs
147+
:type: dict[str, Any] | None
148+
149+
150+
.. py:attribute:: debug_root_path
151+
:type: str | None
152+
153+
154+
.. py:attribute:: compile_flags
155+
:type: list[str] | str | None
156+
157+
158+
.. py:attribute:: func_source
159+
:type: str
160+
161+
162+
.. py:attribute:: signature
163+
:type: inspect.Signature
164+
165+
166+
.. py:method:: __post_init__()
167+
168+
169+
.. py:method:: get_tir(*args, **kwargs)
170+
171+
172+
.. py:method:: par_compile(configs, num_workers = None, ignore_error = False)
173+
174+
175+
.. py:method:: compile(*args, **kwargs)
176+
177+
178+
.. py:method:: __call__(*args, **kwargs)
179+
180+
181+
.. py:function:: jit(func: Callable[_P, tilelang.language.v2.PrimFunc[_KP, _T]]) -> JITImpl[_P, _KP, _T]
182+
jit(*, out_idx: Any = None, target: str | tvm.target.Target = 'auto', target_host: str | tvm.target.Target = None, execution_backend: Literal['dlpack', 'ctypes', 'cython', 'nvrtc'] = 'cython', verbose: bool = False, pass_configs: dict[str, Any] | None = None, debug_root_path: str | None = None, compile_flags: list[str] | str | None = None) -> Callable[[Callable[_P, tilelang.language.v2.PrimFunc[_KP, _T]]], JITImpl[_P, _KP, _T]]
69183
70184
Just-In-Time (JIT) compiler decorator for TileLang functions.
71185

_sources/autoapi/tilelang/jit/kernel/index.rst.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Module Contents
2727
2828
.. py:class:: JITKernel(func = None, out_idx = None, execution_backend = 'cython', target = 'auto', target_host = None, verbose = False, pass_configs = None, from_database = False, compile_flags = None)
2929
30+
Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ , :py:obj:`_T`\ ]
31+
32+
3033
A wrapper class for compiling and invoking TileLang (TVM TIR) functions as PyTorch-compatible functions.
3134

3235
.. attribute:: artifact

_sources/autoapi/tilelang/language/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Submodules
3939
/autoapi/tilelang/language/symbolics/index
4040
/autoapi/tilelang/language/tir/index
4141
/autoapi/tilelang/language/utils/index
42+
/autoapi/tilelang/language/v2/index
4243
/autoapi/tilelang/language/warpgroup/index
4344

4445

0 commit comments

Comments
 (0)