Lines Matching refs:capabilities
2077 static bool isQuantized8PerformanceConsistentWithP(const V1_2::Capabilities& capabilities) { in isQuantized8PerformanceConsistentWithP() argument
2079 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_QUANT8_ASYMM); in isQuantized8PerformanceConsistentWithP()
2082 [quantized8Performance, &capabilities](OperandType type) { in isQuantized8PerformanceConsistentWithP()
2084 lookup(capabilities.operandPerformance, in isQuantized8PerformanceConsistentWithP()
2089 static bool isQuantized8PerformanceConsistentWithP(const V1_3::Capabilities& capabilities) { in isQuantized8PerformanceConsistentWithP() argument
2091 lookup(capabilities.operandPerformance, OperandType::TENSOR_QUANT8_ASYMM); in isQuantized8PerformanceConsistentWithP()
2094 [quantized8Performance, &capabilities](OperandType type) { in isQuantized8PerformanceConsistentWithP()
2096 lookup(capabilities.operandPerformance, type); in isQuantized8PerformanceConsistentWithP()
2117 bool compliantWithV1_0(const V1_1::Capabilities& capabilities) { in compliantWithV1_0() argument
2118 return capabilities.relaxedFloat32toFloat16Performance == capabilities.float32Performance; in compliantWithV1_0()
2121 bool compliantWithV1_0(const V1_2::Capabilities& capabilities) { in compliantWithV1_0() argument
2123 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32); in compliantWithV1_0()
2125 lookup(capabilities.operandPerformance, V1_2::OperandType::FLOAT32); in compliantWithV1_0()
2127 perfTensorFloat32 != capabilities.relaxedFloat32toFloat16PerformanceTensor || in compliantWithV1_0()
2128 perfFloat32 != capabilities.relaxedFloat32toFloat16PerformanceScalar) { in compliantWithV1_0()
2132 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_0()
2135 bool compliantWithV1_0(const V1_3::Capabilities& capabilities) { in compliantWithV1_0() argument
2137 lookup(capabilities.operandPerformance, OperandType::TENSOR_FLOAT32); in compliantWithV1_0()
2139 lookup(capabilities.operandPerformance, OperandType::FLOAT32); in compliantWithV1_0()
2141 perfTensorFloat32 != capabilities.relaxedFloat32toFloat16PerformanceTensor || in compliantWithV1_0()
2142 perfFloat32 != capabilities.relaxedFloat32toFloat16PerformanceScalar) { in compliantWithV1_0()
2146 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_0()
2157 bool compliantWithV1_1(const V1_2::Capabilities& capabilities) { in compliantWithV1_1() argument
2158 if ((capabilities.relaxedFloat32toFloat16PerformanceTensor != in compliantWithV1_1()
2159 capabilities.relaxedFloat32toFloat16PerformanceScalar) || in compliantWithV1_1()
2160 (lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32) != in compliantWithV1_1()
2161 lookup(capabilities.operandPerformance, V1_2::OperandType::FLOAT32))) { in compliantWithV1_1()
2165 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_1()
2168 bool compliantWithV1_1(const V1_3::Capabilities& capabilities) { in compliantWithV1_1() argument
2169 if ((capabilities.relaxedFloat32toFloat16PerformanceTensor != in compliantWithV1_1()
2170 capabilities.relaxedFloat32toFloat16PerformanceScalar) || in compliantWithV1_1()
2171 (lookup(capabilities.operandPerformance, OperandType::TENSOR_FLOAT32) != in compliantWithV1_1()
2172 lookup(capabilities.operandPerformance, OperandType::FLOAT32))) { in compliantWithV1_1()
2176 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_1()
2296 V1_0::Capabilities convertToV1_0(const V1_0::Capabilities& capabilities) { in convertToV1_0() argument
2297 return capabilities; in convertToV1_0()
2300 V1_0::Capabilities convertToV1_0(const V1_1::Capabilities& capabilities) { in convertToV1_0() argument
2301 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
2302 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
2305 return {.float32Performance = capabilities.float32Performance, in convertToV1_0()
2306 .quantized8Performance = capabilities.quantized8Performance}; in convertToV1_0()
2309 V1_0::Capabilities convertToV1_0(const V1_2::Capabilities& capabilities) { in convertToV1_0() argument
2310 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
2311 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
2315 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32), in convertToV1_0()
2316 .quantized8Performance = lookup(capabilities.operandPerformance, in convertToV1_0()
2320 V1_0::Capabilities convertToV1_0(const V1_3::Capabilities& capabilities) { in convertToV1_0() argument
2321 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
2322 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
2326 lookup(capabilities.operandPerformance, OperandType::TENSOR_FLOAT32), in convertToV1_0()
2328 lookup(capabilities.operandPerformance, OperandType::TENSOR_QUANT8_ASYMM)}; in convertToV1_0()
2331 V1_1::Capabilities convertToV1_1(const V1_0::Capabilities& capabilities) { in convertToV1_1() argument
2332 return {.float32Performance = capabilities.float32Performance, in convertToV1_1()
2333 .quantized8Performance = capabilities.quantized8Performance, in convertToV1_1()
2334 .relaxedFloat32toFloat16Performance = capabilities.float32Performance}; in convertToV1_1()
2337 V1_1::Capabilities convertToV1_1(const V1_1::Capabilities& capabilities) { in convertToV1_1() argument
2338 return capabilities; in convertToV1_1()
2341 V1_1::Capabilities convertToV1_1(const V1_2::Capabilities& capabilities) { in convertToV1_1() argument
2342 if (!compliantWithV1_1(capabilities)) { in convertToV1_1()
2343 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_1()
2347 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32), in convertToV1_1()
2349 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_QUANT8_ASYMM), in convertToV1_1()
2351 capabilities.relaxedFloat32toFloat16PerformanceTensor}; in convertToV1_1()
2354 V1_1::Capabilities convertToV1_1(const V1_3::Capabilities& capabilities) { in convertToV1_1() argument
2355 if (!compliantWithV1_1(capabilities)) { in convertToV1_1()
2356 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_1()
2360 lookup(capabilities.operandPerformance, OperandType::TENSOR_FLOAT32), in convertToV1_1()
2362 lookup(capabilities.operandPerformance, OperandType::TENSOR_QUANT8_ASYMM), in convertToV1_1()
2364 capabilities.relaxedFloat32toFloat16PerformanceTensor}; in convertToV1_1()
2367 V1_2::Capabilities convertToV1_2(const V1_0::Capabilities& capabilities) { in convertToV1_2() argument
2369 .relaxedFloat32toFloat16PerformanceScalar = capabilities.float32Performance, in convertToV1_2()
2370 .relaxedFloat32toFloat16PerformanceTensor = capabilities.float32Performance, in convertToV1_2()
2372 makeQuantized8PerformanceConsistentWithP(capabilities.quantized8Performance)}; in convertToV1_2()
2376 capabilities.float32Performance}; in convertToV1_2()
2377 opPerf[opPerf.size() - 1] = {V1_2::OperandType::FLOAT32, capabilities.float32Performance}; in convertToV1_2()
2386 V1_2::Capabilities convertToV1_2(const V1_1::Capabilities& capabilities) { in convertToV1_2() argument
2388 capabilities.relaxedFloat32toFloat16Performance, in convertToV1_2()
2390 capabilities.relaxedFloat32toFloat16Performance, in convertToV1_2()
2392 capabilities.quantized8Performance)}; in convertToV1_2()
2396 capabilities.float32Performance}; in convertToV1_2()
2397 opPerf[opPerf.size() - 1] = {V1_2::OperandType::FLOAT32, capabilities.float32Performance}; in convertToV1_2()
2406 V1_2::Capabilities convertToV1_2(const V1_2::Capabilities& capabilities) { in convertToV1_2() argument
2407 return capabilities; in convertToV1_2()
2410 V1_2::Capabilities convertToV1_2(const V1_3::Capabilities& capabilities) { in convertToV1_2() argument
2413 capabilities.relaxedFloat32toFloat16PerformanceScalar, in convertToV1_2()
2415 capabilities.relaxedFloat32toFloat16PerformanceTensor, in convertToV1_2()
2417 const auto& inputOpPerf = capabilities.operandPerformance; in convertToV1_2()
2437 V1_3::Capabilities convertToV1_3(const V1_0::Capabilities& capabilities) { in convertToV1_3() argument
2438 return convertToV1_3(convertToV1_2(capabilities)); in convertToV1_3()
2441 V1_3::Capabilities convertToV1_3(const V1_1::Capabilities& capabilities) { in convertToV1_3() argument
2442 return convertToV1_3(convertToV1_2(capabilities)); in convertToV1_3()
2445 V1_3::Capabilities convertToV1_3(const V1_2::Capabilities& capabilities) { in convertToV1_3() argument
2448 capabilities.relaxedFloat32toFloat16PerformanceScalar, in convertToV1_3()
2450 capabilities.relaxedFloat32toFloat16PerformanceTensor, in convertToV1_3()
2455 opPerf.resize(capabilities.operandPerformance.size()); in convertToV1_3()
2456 std::transform(capabilities.operandPerformance.begin(), capabilities.operandPerformance.end(), in convertToV1_3()
2464 V1_3::Capabilities convertToV1_3(const V1_3::Capabilities& capabilities) { in convertToV1_3() argument
2465 return capabilities; in convertToV1_3()