Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions tuner/tuner/dispatch_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,8 @@ def get_problem_size(self) -> ProblemSize:
contraction_dims = linalg.infer_contraction_dimensions(root_op)
assert contraction_dims, "no contraction dimensions"

# TODO(Bangtian): Expose Python bindings for getting indexing maps.
indexing_maps_attr = None
for attr in root_op.opview.attributes:
if attr.name == "indexing_maps" and isinstance(attr.attr, ir.ArrayAttr):
indexing_maps_attr = attr.attr
break

assert indexing_maps_attr, "indexing_maps attribute not found"
maps = [attr.value for attr in indexing_maps_attr]
res_maps = linalg.get_indexing_maps(root_op)
maps = [map_attr.value for map_attr in res_maps]
lhs_dims = get_map_result_dim_positions(maps[0])
rhs_dims = get_map_result_dim_positions(maps[1])
res_dims = get_map_result_dim_positions(maps[2])
Expand Down
Loading