• Home
  • Raw
  • Download

Lines Matching refs:context

363 bool prepare(OperationType opType, IOperationExecutionContext* context) {  in prepare()  argument
364 Shape input = context->getInputShape(kInputTensor); in prepare()
374 auto outputShape = context->getOutputShape(kOutputTensor); in prepare()
394 return context->setOutputShape(kOutputTensor, output); in prepare()
397 bool executeRelu(IOperationExecutionContext* context) { in executeRelu() argument
399 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeRelu()
400 switch (context->getInputType(kInputTensor)) { in executeRelu()
402 return reluFloat(context->getInputBuffer<_Float16>(kInputTensor), in executeRelu()
403 context->getInputShape(kInputTensor), in executeRelu()
404 context->getOutputBuffer<_Float16>(kOutputTensor), in executeRelu()
405 context->getOutputShape(kOutputTensor)); in executeRelu()
407 return reluFloat(context->getInputBuffer<float>(kInputTensor), in executeRelu()
408 context->getInputShape(kInputTensor), in executeRelu()
409 context->getOutputBuffer<float>(kOutputTensor), in executeRelu()
410 context->getOutputShape(kOutputTensor)); in executeRelu()
412 return reluQuant8(context->getInputBuffer<uint8_t>(kInputTensor), in executeRelu()
413 context->getInputShape(kInputTensor), in executeRelu()
414 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeRelu()
415 context->getOutputShape(kOutputTensor)); in executeRelu()
417 return reluQuant8Signed(context->getInputBuffer<int8_t>(kInputTensor), in executeRelu()
418 context->getInputShape(kInputTensor), in executeRelu()
419 context->getOutputBuffer<int8_t>(kOutputTensor), in executeRelu()
420 context->getOutputShape(kOutputTensor)); in executeRelu()
426 bool executeRelu1(IOperationExecutionContext* context) { in executeRelu1() argument
428 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeRelu1()
429 switch (context->getInputType(kInputTensor)) { in executeRelu1()
431 return relu1Float(context->getInputBuffer<_Float16>(kInputTensor), in executeRelu1()
432 context->getInputShape(kInputTensor), in executeRelu1()
433 context->getOutputBuffer<_Float16>(kOutputTensor), in executeRelu1()
434 context->getOutputShape(kOutputTensor)); in executeRelu1()
436 return relu1Float(context->getInputBuffer<float>(kInputTensor), in executeRelu1()
437 context->getInputShape(kInputTensor), in executeRelu1()
438 context->getOutputBuffer<float>(kOutputTensor), in executeRelu1()
439 context->getOutputShape(kOutputTensor)); in executeRelu1()
441 return relu1Quant8(context->getInputBuffer<uint8_t>(kInputTensor), in executeRelu1()
442 context->getInputShape(kInputTensor), in executeRelu1()
443 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeRelu1()
444 context->getOutputShape(kOutputTensor)); in executeRelu1()
446 return relu1Quant8Signed(context->getInputBuffer<int8_t>(kInputTensor), in executeRelu1()
447 context->getInputShape(kInputTensor), in executeRelu1()
448 context->getOutputBuffer<int8_t>(kOutputTensor), in executeRelu1()
449 context->getOutputShape(kOutputTensor)); in executeRelu1()
455 bool executeRelu6(IOperationExecutionContext* context) { in executeRelu6() argument
457 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeRelu6()
458 switch (context->getInputType(kInputTensor)) { in executeRelu6()
460 return relu6Float(context->getInputBuffer<_Float16>(kInputTensor), in executeRelu6()
461 context->getInputShape(kInputTensor), in executeRelu6()
462 context->getOutputBuffer<_Float16>(kOutputTensor), in executeRelu6()
463 context->getOutputShape(kOutputTensor)); in executeRelu6()
465 return relu6Float(context->getInputBuffer<float>(kInputTensor), in executeRelu6()
466 context->getInputShape(kInputTensor), in executeRelu6()
467 context->getOutputBuffer<float>(kOutputTensor), in executeRelu6()
468 context->getOutputShape(kOutputTensor)); in executeRelu6()
470 return relu6Quant8(context->getInputBuffer<uint8_t>(kInputTensor), in executeRelu6()
471 context->getInputShape(kInputTensor), in executeRelu6()
472 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeRelu6()
473 context->getOutputShape(kOutputTensor)); in executeRelu6()
475 return relu6Quant8Signed(context->getInputBuffer<int8_t>(kInputTensor), in executeRelu6()
476 context->getInputShape(kInputTensor), in executeRelu6()
477 context->getOutputBuffer<int8_t>(kOutputTensor), in executeRelu6()
478 context->getOutputShape(kOutputTensor)); in executeRelu6()
484 bool executeLogistic(IOperationExecutionContext* context) { in executeLogistic() argument
486 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeLogistic()
487 switch (context->getInputType(kInputTensor)) { in executeLogistic()
489 return logisticFloat(context->getInputBuffer<_Float16>(kInputTensor), in executeLogistic()
490 context->getInputShape(kInputTensor), in executeLogistic()
491 context->getOutputBuffer<_Float16>(kOutputTensor), in executeLogistic()
492 context->getOutputShape(kOutputTensor)); in executeLogistic()
494 return logisticFloat(context->getInputBuffer<float>(kInputTensor), in executeLogistic()
495 context->getInputShape(kInputTensor), in executeLogistic()
496 context->getOutputBuffer<float>(kOutputTensor), in executeLogistic()
497 context->getOutputShape(kOutputTensor)); in executeLogistic()
499 return logisticQuant8(context->getInputBuffer<uint8_t>(kInputTensor), in executeLogistic()
500 context->getInputShape(kInputTensor), in executeLogistic()
501 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeLogistic()
502 context->getOutputShape(kOutputTensor)); in executeLogistic()
504 return logisticQuant8Signed(context->getInputBuffer<int8_t>(kInputTensor), in executeLogistic()
505 context->getInputShape(kInputTensor), in executeLogistic()
506 context->getOutputBuffer<int8_t>(kOutputTensor), in executeLogistic()
507 context->getOutputShape(kOutputTensor)); in executeLogistic()
513 bool executeTanh(IOperationExecutionContext* context) { in executeTanh() argument
515 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeTanh()
516 switch (context->getInputType(kInputTensor)) { in executeTanh()
518 return tanhFloat16(context->getInputBuffer<_Float16>(kInputTensor), in executeTanh()
519 context->getInputShape(kInputTensor), in executeTanh()
520 context->getOutputBuffer<_Float16>(kOutputTensor), in executeTanh()
521 context->getOutputShape(kOutputTensor)); in executeTanh()
523 return tanhFloat32(context->getInputBuffer<float>(kInputTensor), in executeTanh()
524 context->getInputShape(kInputTensor), in executeTanh()
525 context->getOutputBuffer<float>(kOutputTensor), in executeTanh()
526 context->getOutputShape(kOutputTensor)); in executeTanh()
528 return tanhQuant8(context->getInputBuffer<uint8_t>(kInputTensor), in executeTanh()
529 context->getInputShape(kInputTensor), in executeTanh()
530 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeTanh()
531 context->getOutputShape(kOutputTensor)); in executeTanh()
533 return tanhQuant8Signed(context->getInputBuffer<int8_t>(kInputTensor), in executeTanh()
534 context->getInputShape(kInputTensor), in executeTanh()
535 context->getOutputBuffer<int8_t>(kOutputTensor), in executeTanh()
536 context->getOutputShape(kOutputTensor)); in executeTanh()
542 bool executeHardSwish(IOperationExecutionContext* context) { in executeHardSwish() argument
544 if (getNumberOfElements(context->getOutputShape(kOutputTensor)) == 0) return true; in executeHardSwish()
545 switch (context->getInputType(kInputTensor)) { in executeHardSwish()
547 const Shape& inputShape = context->getInputShape(kInputTensor); in executeHardSwish()
548 const Shape& outputShape = context->getOutputShape(kOutputTensor); in executeHardSwish()
551 convertFloat16ToFloat32(context->getInputBuffer<_Float16>(kInputTensor), &inputFloat); in executeHardSwish()
555 convertFloat32ToFloat16(outputFloat, context->getOutputBuffer<_Float16>(kOutputTensor)); in executeHardSwish()
560 convertShapeToTflshape(context->getInputShape(kInputTensor)), in executeHardSwish()
561 context->getInputBuffer<float>(kInputTensor), in executeHardSwish()
562 convertShapeToTflshape(context->getOutputShape(kOutputTensor)), in executeHardSwish()
563 context->getOutputBuffer<float>(kOutputTensor)); in executeHardSwish()
567 return hardSwishQuant(context->getInputBuffer<uint8_t>(kInputTensor), in executeHardSwish()
568 context->getInputShape(kInputTensor), in executeHardSwish()
569 context->getOutputBuffer<uint8_t>(kOutputTensor), in executeHardSwish()
570 context->getOutputShape(kOutputTensor)); in executeHardSwish()
572 return hardSwishQuant(context->getInputBuffer<int8_t>(kInputTensor), in executeHardSwish()
573 context->getInputShape(kInputTensor), in executeHardSwish()
574 context->getOutputBuffer<int8_t>(kOutputTensor), in executeHardSwish()
575 context->getOutputShape(kOutputTensor)); in executeHardSwish()