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