ROCm / triton

Development repository for the Triton language and compiler
MIT License
83 stars 27 forks source link

Add view_slice ttgir instruction #427

Closed oplavsic closed 8 months ago

oplavsic commented 8 months ago

This instruction represents view of the slice of the tensor in registers. Syntax of the operation is the same as for extract_slice op. However, unlike 'extract_slice' which slices in shared memory, 'view_slice' specifically slices within registers. Slice of the tensor is required to have the same layout as the original tensor. In a way, semantics of the 'view_slice' operation is a combination of the 'extract_slice' and 'view' operations semantics.

This PR adds support for slicing tensors in blocked layout. TODO: Support slicing in dot layout.