tilelang.tools.Analyzer

Attributes

類別

AnalysisResult

A data class to store the results of the analysis.

Analyzer

A class to analyze the performance of a TVM IR module.

Module Contents

tilelang.tools.Analyzer.ARCH_CONFIGS
tilelang.tools.Analyzer.logger
class tilelang.tools.Analyzer.AnalysisResult

A data class to store the results of the analysis. .. attribute:: total_flops

Total floating-point operations.

total_global_bytes

Total bytes transferred to/from global memory.

estimated_time

Estimated execution time (seconds).

tflops

Achieved TFLOPS (trillions of FLOPs per second).

bandwidth_GBps

Achieved memory bandwidth in GB/s.

total_flops: int
total_global_bytes: int
estimated_time: float
expected_tflops: float
expected_bandwidth_GBps: float
class tilelang.tools.Analyzer.Analyzer(fn, device)

A class to analyze the performance of a TVM IR module. It calculates metrics such as FLOPs, memory bandwidth, and estimated execution time.

device
total_flops = 0
total_global_bytes = 0
block_counts
loop_stack = []
global_buffers
ir_pass()

Traverse and transform the IR module to extract performance-related information. :returns: The Analyzer instance. :rtype: self

calculate()

Calculate performance metrics based on the analysis. :returns: The calculated performance metrics. :rtype: AnalysisResult

回傳型別:

AnalysisResult

classmethod analysis(fn, device)

Perform a full analysis of the given IR module or PrimFunc. :param fn: A TVM IRModule or PrimFunc to analyze. :param device: The target device information.

回傳:

The calculated performance metrics.

回傳型別:

AnalysisResult