tensorrtx icon indicating copy to clipboard operation
tensorrtx copied to clipboard

如何定义新的算子

Open hankhaohao opened this issue 3 years ago • 4 comments
trafficstars

Env

  • GPU, 3060.
  • OS,Win10.
  • Cuda version 11.0
  • TensorRT version 7.2.3.4

请教一下作者,针对网络中tensorrt不支持的算子,该如何定义新的算子,然后再构建网络,创建engine?谢谢

hankhaohao avatar Jul 14 '22 09:07 hankhaohao

You can refer to any plugins in this repo. For example, the yololayer plugin of yolov5.

wang-xinyu avatar Jul 18 '22 04:07 wang-xinyu

谢谢,请教一下,为什么在yolov5的工程中,申明在yololayer.h的类和函数,定义为什么要写在yololayer.cu中?为什么不写在yololayer.c中?这两者有什么区别吗?

hankhaohao avatar Jul 19 '22 06:07 hankhaohao

.cu contains CUDA code, not a pure cpp code.

wang-xinyu avatar Jul 20 '22 05:07 wang-xinyu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 18 '22 08:09 stale[bot]