| |
| |
|
|
| from enum import IntEnum |
|
|
|
|
| class OptimizeStrategy(IntEnum): |
| SingleBatchDecodeOnly = 0 |
| ContigousBatching = 1 |
|
|
| def is_single_batch_decode_only(self): |
| return self == OptimizeStrategy.SingleBatchDecodeOnly |
|
|
| def is_contigous_batching(self): |
| return self == OptimizeStrategy.ContigousBatching |
|
|
|
|
| class TransformKind(IntEnum): |
| NonTransform = 0 |
| InterWarpTransform = 1 |
| IntraWarpTransform = 2 |
| LDMatrixTransform = 3 |
|
|
| def is_non_transform(self): |
| return self == TransformKind.NonTransform |
|
|
| def is_inter_warp_transform(self): |
| return self == TransformKind.InterWarpTransform |
|
|
| def is_intra_warp_transform(self): |
| return self == TransformKind.IntraWarpTransform |
|
|
| def is_ld_matrix_transform(self): |
| return self == TransformKind.LDMatrixTransform |
|
|
|
|
| class BackendKind(IntEnum): |
| TIR = 0 |
| TileLang = 1 |
|
|
| def is_tir_backend(self): |
| return self == BackendKind.TIR |
|
|
| def is_tilelang_backend(self): |
| return self == BackendKind.TileLang |
|
|
|
|
| class QuantizationMemoryStage(IntEnum): |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Local = 0 |
| Shared = 1 |
| Global = 2 |
|
|
| def is_quant_memory_in_local(self): |
| return self == QuantizationMemoryStage.Local |
|
|
| def is_quant_memory_in_shared(self): |
| return self == QuantizationMemoryStage.Shared |
|
|
| def is_quant_memory_in_global(self): |
| return self == QuantizationMemoryStage.Global |
|
|