| 25 | namespace { |
| 26 | |
| 27 | bool IsTensorArray(ValidationState_t& _, uint32_t id) { |
| 28 | auto def = _.FindDef(id); |
| 29 | if (!def || (def->opcode() != spv::Op::OpTypeArray && |
| 30 | def->opcode() != spv::Op::OpTypeRuntimeArray)) { |
| 31 | return false; |
| 32 | } |
| 33 | auto tdef = _.FindDef(def->word(2)); |
| 34 | if (!tdef || tdef->opcode() != spv::Op::OpTypeTensorARM) { |
| 35 | return false; |
| 36 | } |
| 37 | return true; |
| 38 | } |
| 39 | |
| 40 | bool IsGraphInterfaceType(ValidationState_t& _, uint32_t id) { |
| 41 | return _.IsTensorType(id) || IsTensorArray(_, id); |
no test coverage detected