| 10 | #include "vm/instruction.h" |
| 11 | |
| 12 | static int is_equal_tensor_layout(Tensor* tensor0, Tensor* tensor1) { |
| 13 | if (tensor0->dtype.type_enum != tensor1->dtype.type_enum) { |
| 14 | return 0; |
| 15 | } |
| 16 | Layout layout0 = tensor0->layout; |
| 17 | Layout layout1 = tensor1->layout; |
| 18 | if (layout0.nr_dim != layout1.nr_dim) { |
| 19 | return 0; |
| 20 | } |
| 21 | for (int i = 0; i < layout0.nr_dim; ++i) { |
| 22 | if (layout0.dims[i] != layout1.dims[i]) { |
| 23 | return 0; |
| 24 | } |
| 25 | } |
| 26 | return 1; |
| 27 | } |
| 28 | |
| 29 | static int get_ins_nr_processed_weights(Opr* opr, DeviceModel* model) { |
| 30 | int init_index = opr->init_func; |
no outgoing calls
no test coverage detected