warp
warp copied to clipboard
[QUESTION] Does tile support reading matrices from column-major arrays and performing operations?
As I understand, tile operations currently assume data is in row-major order by default. However, I noticed that there is a layout field in the tile-related code to describe the memory ordering. Is it possible to specify the major order?
class tile(Tile[DType, Shape]):
"""A Warp tile object.
Attributes:
dtype (DType): The data type of the tile
shape (Shape): Dimensions of the tile
storage (str): 'register' or 'shared' memory storage
layout (str): 'rowmajor' or 'colmajor' layout # here!!!!!!!!!!!!!!!!!!!!!!!!
strides (tuple[int]): Number of tile elements between successive tile entries in each dimension
size (int): Total number of tile elements
owner (bool): Whether this tile aliases or owns its data
It isn't possible to specify row or column-major order when loading data into tiles, but you can use wp.transpose() which effectively swaps the layout interpretation of the data.
It isn't possible to specify row or column-major order when loading data into tiles, but you can use wp.transpose() which effectively swaps the layout interpretation of the data.
Thank you. I'll try it out.