File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,8 @@ def get_problem_size(self) -> ProblemSize:
5757 contraction_dims = linalg .infer_contraction_dimensions (root_op )
5858 assert contraction_dims , "no contraction dimensions"
5959
60- # TODO(Bangtian): Expose Python bindings for getting indexing maps.
61- indexing_maps_attr = None
62- for attr in root_op .opview .attributes :
63- if attr .name == "indexing_maps" and isinstance (attr .attr , ir .ArrayAttr ):
64- indexing_maps_attr = attr .attr
65- break
66-
67- assert indexing_maps_attr , "indexing_maps attribute not found"
68- maps = [attr .value for attr in indexing_maps_attr ]
60+ res_maps = linalg .get_indexing_maps (root_op )
61+ maps = [map_attr .value for map_attr in res_maps ]
6962 lhs_dims = get_map_result_dim_positions (maps [0 ])
7063 rhs_dims = get_map_result_dim_positions (maps [1 ])
7164 res_dims = get_map_result_dim_positions (maps [2 ])
You can’t perform that action at this time.
0 commit comments