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

Function IsRankedTensor

source/val/validate_tensor.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace {
24
25bool IsRankedTensor(ValidationState_t& _, uint32_t id) {
26 auto inst = _.FindDef(id);
27 if (!inst || inst->opcode() != spv::Op::OpTypeTensorARM ||
28 inst->words().size() <= 3) {
29 return false;
30 }
31 return true;
32}
33
34uint64_t GetTensorTypeRank(ValidationState_t& _, uint32_t id) {
35 auto inst = _.FindDef(id);

Callers 3

ValidateTensorReadFunction · 0.85
ValidateTensorWriteFunction · 0.85
ValidateTensorQuerySizeFunction · 0.85

Calls 3

FindDefMethod · 0.80
opcodeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected