tilelang.rocm.language.gemm_op ============================== .. py:module:: tilelang.rocm.language.gemm_op .. autoapi-nested-parse:: ROCm dialect of ``T.gemm``: the common GEMM plus ROCm-specific knobs. Functions --------- .. autoapisummary:: tilelang.rocm.language.gemm_op.gemm Module Contents --------------- .. py:function:: gemm(A, B, C, transpose_A = False, transpose_B = False, policy = GemmWarpPolicy.Square, clear_accum = False, k_pack = 1, annotations = None) TileLang GEMM operator for ROCm. Same semantics as the common :func:`tilelang.language.gemm_op.gemm`. ``k_pack`` packs multiple matrix-core operations along K in the MFMA/WMMA lowering (CDNA/RDNA); it is a performance knob with no counterpart on other targets. :param A: Input buffer A. :type A: BufferLikeType, i.e. Buffer | BufferLoad | BufferRegion, or Var :param B: Input buffer B. :type B: BufferLikeType :param C: Output buffer C. :type C: BufferLikeType :param transpose_A: Whether to transpose A. Defaults to False. :type transpose_A: bool :param transpose_B: Whether to transpose B. Defaults to False. :type transpose_B: bool :param policy: GEMM warp partition policy. :type policy: GemmWarpPolicy :param clear_accum: Whether to clear the accumulator. :type clear_accum: bool :param k_pack: Number of packed matrix cores along K. Must be 1 or 2. Defaults to 1. :type k_pack: int :param annotations: Additional annotations. :type annotations: Optional[dict] :returns: A handle to the GEMM operation. :rtype: tirx.Call