Comments (4)
transmit tensors between SGX and the untrusted environment
Please expand on this. What do you mean by "transmit"? In which direction? In which format? Can you use regular files for this transmission (that's the typical way of sharing something between the untrusted host and the SGX enclave)?
from graphene.
Thanks for your quick apply! I want to perform some tensor computation inside the SGX and other computations in the untrusted environment. This requires to transmit variables in and out the SGX in both directions.
The format is pytorch tensor. Regular files are viable options but I'm afraid the file operation is slow. Is it possible to use some shared memory between SGX and the untrusted environment?
This repo implements a similar feature using TensorFlow. However, because I'm not very familiar with SGX, currently I don't know how it implements this feature.
from graphene.
I want to perform some tensor computation inside the SGX and other computations in the untrusted environment.
Gramine is a generic SGX runtime, and it doesn't allow for splitting the process in trusted and untrusted parts. The whole process must be shifted inside Gramine (and thus to inside the SGX enclave). So I'm afraid that without significant refactoring of your original PyTorch program, you won't be able to achieve your goal.
Is it possible to use some shared memory between SGX and the untrusted environment?
No, Gramine doesn't support this. Maybe in the future we'll add such support, but currently there is none.
This repo implements a similar feature using TensorFlow.
The Slalom (https://github.com/ftramer/slalom) work is definitely interesting, but Gramine has different purposes, design, and implementation. Thus, Gramine cannot do similar things as Slalom.
The only thing you can try to do with Gramine is something like this:
- Split your original PyTorch application such that it runs two processes
- One process will do the tensor computations inside the SGX enclave
- Another process will do other computations in the untrusted environment
- Make these two processes communicate with each other using regular files or for example TCP/IP sockets; make sure to use proper encryption schemes on these files/sockets to protect data transmitted between the trusted and the untrusted processes
Now you can shift the first process in the SGX enclave using Gramine. And the second process just runs outside.
from graphene.
Thanks!
from graphene.
Related Issues (20)
- Data transmission error with Python gRPC running in graphene HOT 9
- Huge performance drop when running pytorch training with graphene-sgx HOT 26
- Graphene-SGX: Syscalls wakes up early/prematurely on Server Machines HOT 12
- untrusted PAL sent PAL event HOT 10
- BUG() triggered during vfork and clone HOT 15
- With Go program, inside a docker container, bind fails with permission denied error, invalid handle error. HOT 7
- Workloads (Redis, Curl, R) failing with Out of memory PAL error after new manifest syntax to define lists of SGX trusted files. HOT 7
- Unable to Sign the graphenized Docker image using gsc sign-image: HOT 5
- RFC: Trusted files metadata sideloading
- [Error:38]Function not implemented. multiprocessing in graphene HOT 7
- Function not implemented (src/ip.cpp:563) in testing GSC container HOT 2
- [Examples] Python Example Stuck Without Any Error Message HOT 1
- ModuleNotFoundError: No module named 'graphenelibos' HOT 5
- web server use golang, QPS(queries per second) is very low HOT 4
- File Listener Based on INOTIFY Throws Error HOT 1
- Issue with libprotobuf version. HOT 1
- Issue in Cloud Deployment to AKS HOT 3
- Decimal type prone to float rounding error. HOT 1
- pytorch sample config for better performance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene.