runtime_op.def 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. BEGINE_DEFINE_TARGET(neutral)
  2. DEFINE_NEUTRAL_RUNTIME_OP(binary, Binary, 0x0)
  3. DEFINE_NEUTRAL_RUNTIME_OP(concat, Concat, 0x1)
  4. DEFINE_NEUTRAL_RUNTIME_OP(conv2d, Conv2D, 0x2)
  5. DEFINE_NEUTRAL_RUNTIME_OP(dequantize, Dequantize, 0x3)
  6. DEFINE_NEUTRAL_RUNTIME_OP(matmul, MatMul, 0x4)
  7. DEFINE_NEUTRAL_RUNTIME_OP(pad, Pad, 0x5)
  8. DEFINE_NEUTRAL_RUNTIME_OP(quantize, Quantize, 0x6)
  9. DEFINE_NEUTRAL_RUNTIME_OP(reduce, Reduce, 0x7)
  10. DEFINE_NEUTRAL_RUNTIME_OP(reduce_window2d, ReduceWindow2D, 0x8)
  11. DEFINE_NEUTRAL_RUNTIME_OP(memory_copy, MemoryCopy, 0x9)
  12. DEFINE_NEUTRAL_RUNTIME_OP(resize_image, ResizeImage, 0x0A)
  13. DEFINE_NEUTRAL_RUNTIME_OP(softmax, Softmax, 0x0B)
  14. DEFINE_NEUTRAL_RUNTIME_OP(transpose, Transpose, 0x0C)
  15. DEFINE_NEUTRAL_RUNTIME_OP(strided_slice, StridedSlice, 0x0D)
  16. DEFINE_NEUTRAL_RUNTIME_OP(unary, Unary, 0x0E)
  17. DEFINE_NEUTRAL_RUNTIME_OP(quantized_conv2d, QuantizedConv2D, 0x0F)
  18. DEFINE_NEUTRAL_RUNTIME_OP(quantized_matmul, QuantizedMatMul, 0x10)
  19. DEFINE_NEUTRAL_RUNTIME_OP(quantized_binary, QuantizedBinary, 0x11)
  20. DEFINE_NEUTRAL_RUNTIME_OP(table_lookup1d, TableLookup1D, 0x12)
  21. DEFINE_NEUTRAL_RUNTIME_OP(conv2d_transpose, QuantizedBinary, 0x13)
  22. DEFINE_NEUTRAL_RUNTIME_OP(nnil_unary_method, NNILUnaryMethod, 0x14)
  23. END_DEFINE_TARGET()
  24. // CPU
  25. BEGINE_DEFINE_TARGET(cpu)
  26. DEFINE_RUNTIME_OP(cpu, cpu_conv2d, CPUConv2D, 0x1001)
  27. DEFINE_RUNTIME_OP(cpu, cpu_depthwise_conv2d, CPUDepthwiseConv2D, 0x1002)
  28. DEFINE_RUNTIME_OP(cpu, cpu_reduce_window2d, CPUReduceWindow2D, 0x1003)
  29. DEFINE_RUNTIME_OP(cpu, cpu_quantized_conv2d, CPUQuantizedConv2D, 0x1004)
  30. DEFINE_RUNTIME_OP(cpu, cpu_quantized_depthwise_conv2d, CPUQuantizedDepthwiseConv2D, 0x1005)
  31. END_DEFINE_TARGET()
  32. // K210
  33. BEGINE_DEFINE_TARGET(k210)
  34. DEFINE_RUNTIME_OP(k210, kpu_upload, KPUUpload, 0x2001)
  35. DEFINE_RUNTIME_OP(k210, kpu_conv2d, KPUConv2D, 0x2002)
  36. END_DEFINE_TARGET()