Tensorflow - XLA | Passing tensors to external functions at runtime

有些话、适合烂在心里 提交于 2019-12-11 05:55:28

问题


I'm testing a library that offloads certain sensitive computations into a secure environment. Tensorflow is one application that I and my team are interested to port to work with this, especially to work with XLA. My team wasn't successful with adding a TF op that does the offload.

For this to work with XLA, I need to insert XLA ops that send and receive data to this library through an API provided by the library. My understanding is that these XLA ops have to be added to the translation of TF ops to XLA ops under tensorflow/compiler/tf2xla/. I'm guessing that the operations listed in ComputationBuilder's definition are the available XLA ops and calling an external function isn't currently one of them.

Is it possible to add such an XLA op which can be lowered into an llvm call instruction ? Or is it possible through other means ?

Please share your thoughts.

Thanks !

PS: Please note that I have a more experience with LLVM than with tensorflow.

来源:https://stackoverflow.com/questions/45074560/tensorflow-xla-passing-tensors-to-external-functions-at-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!