| 62 | } |
| 63 | |
| 64 | std::vector<int64_t> SliceMapper::DecreaseAxis() { |
| 65 | std::vector<int64_t> decrease_axis; |
| 66 | bool has_attr = HasAttr("decrease_axis"); |
| 67 | if (has_attr) { |
| 68 | GetAttr("decrease_axis", &decrease_axis); |
| 69 | |
| 70 | // In PIR mode, if decrease_axis is not empty, we should use it directly |
| 71 | // The shape comparison logic may fail in PIR mode due to input name |
| 72 | // differences |
| 73 | if (in_pir_mode && !decrease_axis.empty()) { |
| 74 | return decrease_axis; |
| 75 | } |
| 76 | |
| 77 | auto input_info = GetInput("Input"); |
| 78 | auto output_info = GetOutput("Out"); |
| 79 | if (output_info[0].shape.size() == 1 && output_info[0].shape[0] == 0) { |
| 80 | return decrease_axis; |
| 81 | } |
| 82 | if (input_info[0].shape.size() > output_info[0].shape.size()) { |
| 83 | return decrease_axis; |
| 84 | } |
| 85 | return {}; |
| 86 | } |
| 87 | return decrease_axis; |
| 88 | } |
| 89 | |
| 90 | void SliceMapper::Opset7() { |
| 91 | auto input_info = GetInput("Input"); |
nothing calls this directly
no outgoing calls
no test coverage detected