在 tensorflow 服务中来自 .a 文件的静态 link 自定义操作

Statically link custom op from .a file in tensorflow serving

我有一个自定义操作实现了 CUDA 并使用 Makefile 构建,这样 hdrnet. I can build .so and import in tensorflow. For tf-serving statically linking .a file is required but all tutorials reference bazel build process for custom op 而不是直接从 .a 文件链接已编译的操作。 我是否必须按照示例参考编写构建过程,或者我可以直接使用 .so/.a 文件构建 tf-serving?

我最终使用 op-linked 从源代码编译了 tensorflow-serving。Tensorflow 教程对此并不完整,并且缺少额外的依赖项,我在这个问题 中解决了这个问题。