tilelang.carver.template.gemv ============================= .. py:module:: tilelang.carver.template.gemv Classes ------- .. autoapisummary:: tilelang.carver.template.gemv.GEMVTemplate Module Contents --------------- .. py:class:: GEMVTemplate Bases: :py:obj:`tilelang.carver.template.base.BaseTemplate` A template for Generalized Matrix-Vector Multiplication (GEMV). This template defines the computation for a matrix-vector multiplication with configurable parameters such as transposition, data types, and bias addition. .. py:attribute:: N :type: int :value: None .. py:attribute:: K :type: int :value: None .. py:attribute:: trans_B :type: bool :value: True .. py:attribute:: in_dtype :type: str :value: 'float16' .. py:attribute:: out_dtype :type: str :value: 'float16' .. py:attribute:: accum_dtype :type: str :value: 'float16' .. py:attribute:: with_bias :type: bool :value: False .. py:method:: get_hardware_aware_configs(arch = None, topk = 10) Retrieves optimized hardware-aware configurations. :param arch: The target hardware architecture. :type arch: TileDevice, optional :param topk: Number of top configurations to consider. :type topk: int, optional :returns: A list of optimization hints for hardware acceleration. :rtype: List[Hint] .. py:method:: initialize_function() Defines and initializes the GEMV computation function. This method sets up placeholders for input matrices, computes the matrix-vector multiplication using TVM's compute API, and optionally applies bias and type casting. .. py:method:: params_as_dict() Returns the template parameters as a dictionary. :returns: Dictionary containing template parameter values. :rtype: dict .. py:property:: class_attributes Returns the class attributes in dictionary form. :returns: Dictionary of class attributes. :rtype: dict .. py:method:: __repr__() Returns a string representation of the class instance. :returns: A formatted string representation of the class. :rtype: str