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

Function TensorAddressingOperandsNumWords

source/val/validate_memory.cpp:2756–2765  ·  view source on GitHub ↗

Returns the number of instruction words taken up by a tensor addressing operands argument and its implied operands.

Source from the content-addressed store, hash-verified

2754// Returns the number of instruction words taken up by a tensor addressing
2755// operands argument and its implied operands.
2756int TensorAddressingOperandsNumWords(spv::TensorAddressingOperandsMask mask) {
2757 int result = 1; // Count the mask
2758 if ((mask & spv::TensorAddressingOperandsMask::TensorView) !=
2759 spv::TensorAddressingOperandsMask::MaskNone)
2760 ++result;
2761 if ((mask & spv::TensorAddressingOperandsMask::DecodeFunc) !=
2762 spv::TensorAddressingOperandsMask::MaskNone)
2763 ++result;
2764 return result;
2765}
2766
2767spv_result_t ValidateCooperativeMatrixLoadStoreTensorNV(
2768 ValidationState_t& _, const Instruction* inst) {

Calls

no outgoing calls

Tested by

no test coverage detected