MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / IsTensorArray

Function IsTensorArray

source/val/validate_graph.cpp:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace {
26
27bool 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
40bool IsGraphInterfaceType(ValidationState_t& _, uint32_t id) {
41 return _.IsTensorType(id) || IsTensorArray(_, id);

Callers 3

IsGraphInterfaceTypeFunction · 0.85
ValidateGraphInputFunction · 0.85
ValidateGraphSetOutputFunction · 0.85

Calls 3

FindDefMethod · 0.80
wordMethod · 0.80
opcodeMethod · 0.45

Tested by

no test coverage detected