apache / incubator-teaclave-sgx-sdk

Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.
https://teaclave.apache.org
Apache License 2.0
1.17k stars 263 forks source link

Possibility to implement tensorflow/keras in sgx #335

Open laocaoshilaocao opened 3 years ago

laocaoshilaocao commented 3 years ago

Hi, i want to deploy one deep learning algorithm which uses tensorflow/keras a lot inside SGX. I tried fortanixEDP before with tensorflow C binding API like https://github.com/tensorflow/rust, but it seems really hard to use because tensorflow is based on C and there is no libc in fortanix target. Is that possible to use such C binding API by sgx-sdk for example tensorflow? I mean actually i don't quite understand why the tensorflow works in raw rust but not in SGX. Hope to hear from you.

dingelish commented 3 years ago

thanks for the pointer! i've been watching on tf's sgx support for quite a while. as of today i still believe libtensorflow-sys is the core problem. 2 years ago i looked into tf-lite and iirc my conclusion was that tf-lite could be ported with minimal changes. but i haven't got time for that since then ...

if you want to run full functional tf, another option is to use libOS, such as graphene. I know a couple of companies including Intel are trying to do so.

laocaoshilaocao commented 3 years ago

Thanks for your reply. Maybe it is better for me to rewrite the tf method i need in my project. If in the future sgx-sdk can support tf (no matter what version it is ), i believe that would be a great help for many developments.