mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-02-07 03:31:58 +08:00
22 lines
601 B
Python
22 lines
601 B
Python
# This file is vendored from the Triton project. DO NOT EDIT THIS FILE DIRECTLY.
|
|
# Source: https://github.com/triton-lang/triton/tree/v3.5.1/python/triton_kernels/triton_kernels/tensor_details/layout_details/strided.py
|
|
# Triton is licensed under the MIT License.
|
|
|
|
from .base import Layout
|
|
|
|
|
|
class StridedLayout(Layout):
|
|
name: str = None
|
|
|
|
def __init__(self, shape) -> None:
|
|
super().__init__(shape)
|
|
|
|
def swizzle_data(self, data):
|
|
return data
|
|
|
|
def unswizzle_data(self, data):
|
|
return data
|
|
|
|
def swizzle_block_shape(self, block_shape):
|
|
return block_shape
|