tilelang.contrib.ptodsl.common¶
Common PTODSL compatibility helpers used by generated TileLang kernels.
Functions¶
|
Coerce a scalar value to the PTODSL i1 representation. |
|
Coerce a scalar value to the PTODSL i8 representation. |
|
Coerce a scalar value to the PTODSL i16 representation. |
|
Coerce a scalar value to the PTODSL i32 representation. |
|
Coerce a scalar value to the PTODSL i64 representation. |
|
Coerce a runtime integer to the requested PTODSL scalar type. |
|
Return the underlying IR value for a PTODSL surface value. |
|
Wrap an IR value in PTODSL's public surface representation. |
|
Normalize a scalar predicate to i1, including byte-backed i8 bools. |
|
Wrap a Python literal as a traced constant of dtype; traced values pass through. |
|
Negate a scalar i1 or byte-backed i8 predicate without Python truthiness. |
|
Trace a PTODSL conditional expression with lazily evaluated branches. |
Module Contents¶
- tilelang.contrib.ptodsl.common.coerce_i1(value, *, context)¶
Coerce a scalar value to the PTODSL i1 representation.
- tilelang.contrib.ptodsl.common.coerce_i8(value, *, context)¶
Coerce a scalar value to the PTODSL i8 representation.
- tilelang.contrib.ptodsl.common.coerce_i16(value, *, context)¶
Coerce a scalar value to the PTODSL i16 representation.
- tilelang.contrib.ptodsl.common.coerce_i32(value, *, context)¶
Coerce a scalar value to the PTODSL i32 representation.
- tilelang.contrib.ptodsl.common.coerce_i64(value, *, context)¶
Coerce a scalar value to the PTODSL i64 representation.
- tilelang.contrib.ptodsl.common.coerce_runtime_integer_value(value, target_type, *, context)¶
Coerce a runtime integer to the requested PTODSL scalar type.
- tilelang.contrib.ptodsl.common.unwrap_surface_value(value)¶
Return the underlying IR value for a PTODSL surface value.
- tilelang.contrib.ptodsl.common.wrap_surface_value(value, **kwargs)¶
Wrap an IR value in PTODSL’s public surface representation.
- tilelang.contrib.ptodsl.common.as_logical_bool(value)¶
Normalize a scalar predicate to i1, including byte-backed i8 bools.
- tilelang.contrib.ptodsl.common.wrap_const(value, dtype)¶
Wrap a Python literal as a traced constant of dtype; traced values pass through.
- tilelang.contrib.ptodsl.common.logical_not(value)¶
Negate a scalar i1 or byte-backed i8 predicate without Python truthiness.
- tilelang.contrib.ptodsl.common.if_then_else(condition, true_fn, false_fn)¶
Trace a PTODSL conditional expression with lazily evaluated branches.