For example in sync.py and most of other examples:
The shape is first declared in pto.PartitionTensorViewType.get(shape=[32, 32], element_type=f32)
https://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L17
But again in
https://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L46-L47
The generated IR also have both [%c32, %c32] and <32x32xf32>. This is redundant information.
%2 = pto.partition_view %0, offsets = [%c0, %c0], sizes = [%c32, %c32] : !pto.tensor_view<?x?xf32> -> !pto.partition_tensor_view<32x32xf32>
%3 = pto.partition_view %1, offsets = [%c0, %c0], sizes = [%c32, %c32] : !pto.tensor_view<?x?xf32> -> !pto.partition_tensor_view<32x32xf32>
Better be like tv2_f32 = pto.TensorViewType.get(shape_or_rank=2, element_type=f32) that only specifies rank
https://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L16
Then the IR is less redundant
%0 = pto.make_tensor_view %arg0, shape = [%c32, %c32] strides = [%c32, %c1] : !pto.tensor_view<?x?xf32>
%1 = pto.make_tensor_view %arg1, shape = [%c32, %c32] strides = [%c32, %c1] : !pto.tensor_view<?x?xf32>
For example in sync.py and most of other examples:
The shape is first declared in
pto.PartitionTensorViewType.get(shape=[32, 32], element_type=f32)https://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L17
But again in
https://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L46-L47
The generated IR also have both
[%c32, %c32]and<32x32xf32>. This is redundant information.Better be like
tv2_f32 = pto.TensorViewType.get(shape_or_rank=2, element_type=f32)that only specifies rankhttps://github.com/zhangstevenunity/PTOAS/blob/2c8d83ea0ea1ca748ce53d178bef6878e644d113/test/samples/Sync/sync.py#L16
Then the IR is less redundant