File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/common/transformations/src/transformations/mlir/op Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,8 @@ struct ConvertTranspose {
3131
3232 auto const_order = dynamic_cast <ov::op::v0::Constant*>(node->get_input_node_ptr (1 ));
3333 assert (const_order && " non-const order not supported" );
34- SmallVector<int64_t > order;
35- if (ov_order_element_type == ov::element::i64 ) {
36- ov::Coordinate coords = const_order->get_coordinate_val ();
37- order.assign (coords.begin (), coords.end ());
38- } else {
39- assert (ov_order_element_type == ov::element::i32 );
40- std::vector<int32_t > coords = const_order->get_vector <int32_t >();
41- order.assign (coords.begin (), coords.end ());
42- }
34+ std::vector<int64_t > coords = const_order->cast_vector <int64_t >();
35+ SmallVector<int64_t > order (coords.begin (), coords.end ());
4336
4437 auto empty = builder.create <tensor::EmptyOp>(loc, out_type, dynamic_dimensions);
4538 auto transpose = builder.create <linalg::TransposeOp>(loc, input, empty, order);
You can’t perform that action at this time.
0 commit comments