tilelang.language.customize =========================== .. py:module:: tilelang.language.customize .. autoapi-nested-parse:: The language interface for tl programs. Functions --------- .. autoapisummary:: tilelang.language.customize.atomic_add tilelang.language.customize.atomic_addx2 tilelang.language.customize.atomic_addx4 tilelang.language.customize.dp4a tilelang.language.customize.clamp tilelang.language.customize.reshape tilelang.language.customize.view Module Contents --------------- .. py:function:: atomic_add(dst, value) Perform an atomic addition operation. :param dst: Destination buffer where the atomic addition will be performed :type dst: Buffer :param value: Value to be atomically added :type value: PrimExpr :returns: Handle to the atomic addition operation :rtype: PrimExpr .. py:function:: atomic_addx2(dst, value) Perform an atomic addition operation with double-width operands. :param dst: Destination buffer where the atomic addition will be performed :type dst: Buffer :param value: Value to be atomically added (double-width) :type value: PrimExpr :returns: Handle to the double-width atomic addition operation :rtype: PrimExpr .. py:function:: atomic_addx4(dst, value) Perform an atomic addition operation with double-width operands. :param dst: Destination buffer where the atomic addition will be performed :type dst: Buffer :param value: Value to be atomically added (double-width) :type value: PrimExpr :returns: Handle to the double-width atomic addition operation :rtype: PrimExpr .. py:function:: dp4a(A, B, C) Perform a 4-element dot product with accumulation (DP4A). :param A: First input buffer :type A: Buffer :param B: Second input buffer :type B: Buffer :param C: Accumulation buffer :type C: Buffer :returns: Handle to the DP4A operation :rtype: PrimExpr .. py:function:: clamp(dst, min_val, max_val) Clamps the input value dst between [min_val, max_val] :param dst: Input value to be clamped :param min_val: Minimum value :param max_val: Maximum value :returns: Value clamped to the specified range .. py:function:: reshape(src, shape) Reshapes the input buffer to the specified shape. :param src: Input buffer to be reshaped :type src: Buffer :param shape: New shape for the buffer :type shape: List[PrimExpr] :returns: A new buffer view with the specified shape :rtype: Buffer .. py:function:: view(src, shape = None, dtype = None) Views the input buffer with optionally modified shape and dtype. :param src: Input buffer to be viewed :type src: Buffer :param shape: New shape for the buffer. Defaults to None. :type shape: Union[List[PrimExpr], None], optional :param dtype: New dtype for the buffer. Defaults to None. :type dtype: Union[str, None], optional :returns: A new buffer view with the specified shape and dtype :rtype: Buffer