Lines Matching refs:capabilities
327 static bool isQuantized8PerformanceConsistentWithP(const V1_2::Capabilities& capabilities) { in isQuantized8PerformanceConsistentWithP() argument
329 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_QUANT8_ASYMM); in isQuantized8PerformanceConsistentWithP()
332 [quantized8Performance, &capabilities](V1_3::OperandType type) { in isQuantized8PerformanceConsistentWithP()
334 lookup(capabilities.operandPerformance, in isQuantized8PerformanceConsistentWithP()
339 static bool isQuantized8PerformanceConsistentWithP(const V1_3::Capabilities& capabilities) { in isQuantized8PerformanceConsistentWithP() argument
341 lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_QUANT8_ASYMM); in isQuantized8PerformanceConsistentWithP()
344 [quantized8Performance, &capabilities](V1_3::OperandType type) { in isQuantized8PerformanceConsistentWithP()
346 lookup(capabilities.operandPerformance, type); in isQuantized8PerformanceConsistentWithP()
367 bool compliantWithV1_0(const V1_1::Capabilities& capabilities) { in compliantWithV1_0() argument
368 return capabilities.relaxedFloat32toFloat16Performance == capabilities.float32Performance; in compliantWithV1_0()
371 bool compliantWithV1_0(const V1_2::Capabilities& capabilities) { in compliantWithV1_0() argument
373 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32); in compliantWithV1_0()
375 lookup(capabilities.operandPerformance, V1_2::OperandType::FLOAT32); in compliantWithV1_0()
377 perfTensorFloat32 != capabilities.relaxedFloat32toFloat16PerformanceTensor || in compliantWithV1_0()
378 perfFloat32 != capabilities.relaxedFloat32toFloat16PerformanceScalar) { in compliantWithV1_0()
382 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_0()
385 bool compliantWithV1_0(const V1_3::Capabilities& capabilities) { in compliantWithV1_0() argument
387 lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_FLOAT32); in compliantWithV1_0()
389 lookup(capabilities.operandPerformance, V1_3::OperandType::FLOAT32); in compliantWithV1_0()
391 perfTensorFloat32 != capabilities.relaxedFloat32toFloat16PerformanceTensor || in compliantWithV1_0()
392 perfFloat32 != capabilities.relaxedFloat32toFloat16PerformanceScalar) { in compliantWithV1_0()
396 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_0()
407 bool compliantWithV1_1(const V1_2::Capabilities& capabilities) { in compliantWithV1_1() argument
408 if ((capabilities.relaxedFloat32toFloat16PerformanceTensor != in compliantWithV1_1()
409 capabilities.relaxedFloat32toFloat16PerformanceScalar) || in compliantWithV1_1()
410 (lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32) != in compliantWithV1_1()
411 lookup(capabilities.operandPerformance, V1_2::OperandType::FLOAT32))) { in compliantWithV1_1()
415 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_1()
418 bool compliantWithV1_1(const V1_3::Capabilities& capabilities) { in compliantWithV1_1() argument
419 if ((capabilities.relaxedFloat32toFloat16PerformanceTensor != in compliantWithV1_1()
420 capabilities.relaxedFloat32toFloat16PerformanceScalar) || in compliantWithV1_1()
421 (lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_FLOAT32) != in compliantWithV1_1()
422 lookup(capabilities.operandPerformance, V1_3::OperandType::FLOAT32))) { in compliantWithV1_1()
426 return isQuantized8PerformanceConsistentWithP(capabilities); in compliantWithV1_1()
546 V1_0::Capabilities convertToV1_0(const V1_0::Capabilities& capabilities) { in convertToV1_0() argument
547 return capabilities; in convertToV1_0()
550 V1_0::Capabilities convertToV1_0(const V1_1::Capabilities& capabilities) { in convertToV1_0() argument
551 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
552 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
555 return {.float32Performance = capabilities.float32Performance, in convertToV1_0()
556 .quantized8Performance = capabilities.quantized8Performance}; in convertToV1_0()
559 V1_0::Capabilities convertToV1_0(const V1_2::Capabilities& capabilities) { in convertToV1_0() argument
560 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
561 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
565 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32), in convertToV1_0()
566 .quantized8Performance = lookup(capabilities.operandPerformance, in convertToV1_0()
570 V1_0::Capabilities convertToV1_0(const V1_3::Capabilities& capabilities) { in convertToV1_0() argument
571 if (!compliantWithV1_0(capabilities)) { in convertToV1_0()
572 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_0()
576 lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_FLOAT32), in convertToV1_0()
577 .quantized8Performance = lookup(capabilities.operandPerformance, in convertToV1_0()
581 V1_1::Capabilities convertToV1_1(const V1_0::Capabilities& capabilities) { in convertToV1_1() argument
582 return {.float32Performance = capabilities.float32Performance, in convertToV1_1()
583 .quantized8Performance = capabilities.quantized8Performance, in convertToV1_1()
584 .relaxedFloat32toFloat16Performance = capabilities.float32Performance}; in convertToV1_1()
587 V1_1::Capabilities convertToV1_1(const V1_1::Capabilities& capabilities) { in convertToV1_1() argument
588 return capabilities; in convertToV1_1()
591 V1_1::Capabilities convertToV1_1(const V1_2::Capabilities& capabilities) { in convertToV1_1() argument
592 if (!compliantWithV1_1(capabilities)) { in convertToV1_1()
593 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_1()
597 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_FLOAT32), in convertToV1_1()
599 lookup(capabilities.operandPerformance, V1_2::OperandType::TENSOR_QUANT8_ASYMM), in convertToV1_1()
601 capabilities.relaxedFloat32toFloat16PerformanceTensor}; in convertToV1_1()
604 V1_1::Capabilities convertToV1_1(const V1_3::Capabilities& capabilities) { in convertToV1_1() argument
605 if (!compliantWithV1_1(capabilities)) { in convertToV1_1()
606 LOG(ERROR) << "Upcasting non-compliant capabilities " << toString(capabilities) in convertToV1_1()
610 lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_FLOAT32), in convertToV1_1()
612 lookup(capabilities.operandPerformance, V1_3::OperandType::TENSOR_QUANT8_ASYMM), in convertToV1_1()
614 capabilities.relaxedFloat32toFloat16PerformanceTensor}; in convertToV1_1()
617 V1_2::Capabilities convertToV1_2(const V1_0::Capabilities& capabilities) { in convertToV1_2() argument
619 .relaxedFloat32toFloat16PerformanceScalar = capabilities.float32Performance, in convertToV1_2()
620 .relaxedFloat32toFloat16PerformanceTensor = capabilities.float32Performance, in convertToV1_2()
622 makeQuantized8PerformanceConsistentWithP(capabilities.quantized8Performance)}; in convertToV1_2()
626 capabilities.float32Performance}; in convertToV1_2()
627 opPerf[opPerf.size() - 1] = {V1_2::OperandType::FLOAT32, capabilities.float32Performance}; in convertToV1_2()
636 V1_2::Capabilities convertToV1_2(const V1_1::Capabilities& capabilities) { in convertToV1_2() argument
638 capabilities.relaxedFloat32toFloat16Performance, in convertToV1_2()
640 capabilities.relaxedFloat32toFloat16Performance, in convertToV1_2()
642 capabilities.quantized8Performance)}; in convertToV1_2()
646 capabilities.float32Performance}; in convertToV1_2()
647 opPerf[opPerf.size() - 1] = {V1_2::OperandType::FLOAT32, capabilities.float32Performance}; in convertToV1_2()
656 V1_2::Capabilities convertToV1_2(const V1_2::Capabilities& capabilities) { in convertToV1_2() argument
657 return capabilities; in convertToV1_2()
660 V1_2::Capabilities convertToV1_2(const V1_3::Capabilities& capabilities) { in convertToV1_2() argument
663 capabilities.relaxedFloat32toFloat16PerformanceScalar, in convertToV1_2()
665 capabilities.relaxedFloat32toFloat16PerformanceTensor, in convertToV1_2()
667 const auto& inputOpPerf = capabilities.operandPerformance; in convertToV1_2()
687 V1_3::Capabilities convertToV1_3(const V1_0::Capabilities& capabilities) { in convertToV1_3() argument
688 return convertToV1_3(convertToV1_2(capabilities)); in convertToV1_3()
691 V1_3::Capabilities convertToV1_3(const V1_1::Capabilities& capabilities) { in convertToV1_3() argument
692 return convertToV1_3(convertToV1_2(capabilities)); in convertToV1_3()
695 V1_3::Capabilities convertToV1_3(const V1_2::Capabilities& capabilities) { in convertToV1_3() argument
698 capabilities.relaxedFloat32toFloat16PerformanceScalar, in convertToV1_3()
700 capabilities.relaxedFloat32toFloat16PerformanceTensor, in convertToV1_3()
705 opPerf.resize(capabilities.operandPerformance.size()); in convertToV1_3()
706 std::transform(capabilities.operandPerformance.begin(), capabilities.operandPerformance.end(), in convertToV1_3()
714 V1_3::Capabilities convertToV1_3(const V1_3::Capabilities& capabilities) { in convertToV1_3() argument
715 return capabilities; in convertToV1_3()
1590 Capabilities uncheckedConvert(const V1_3::Capabilities& capabilities) { in uncheckedConvert() argument
1591 return handleError(convert(capabilities)); in uncheckedConvert()