Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit cc39189

Browse files
committed
Add SGX doc
1 parent dd3eb67 commit cc39189

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ Please refer to our [release announcement](https://github.com/PaddlePaddle/Anaki
3434
- Assembly level optimization. Saber is a underlying DNN library for Anakin, which
3535
is deeply optimized at assembly level.
3636

37+
- **Security**
38+
39+
Anakin now supports Intel Software Guard Extensions
40+
([SGX](https://software.intel.com/en-us/sgx)). SGX is a set of instructions
41+
that can set up a extremely secure execution enironment that prevents other
42+
software from inspecting the execution state of your application. Even
43+
privileged code like OS and VMM cannot pry into or tamper with the data and
44+
code of Anakin. To learn more about Anakin for SGX, refer to the
45+
[tutorial](docs/Manual/run_on_sgx.md).
46+
3747
## NV GPU Benchmark
3848
### Machine And Enviornment
3949
> CPU: `Intel(R) Xeon(R) CPU 5117 @ 2.0GHz`

docs/Manual/run_on_sgx.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Compile Anakin for Intel SGX
2+
Currently, only Linux is supported. You can either use Ubuntu or Cent OS, with
3+
the versions supported by Intel SGX Linux driver. Check out the latest versions
4+
of SGX software stack [here](https://01.org/intel-software-guard-extensions/downloads).
5+
6+
## Steps
7+
8+
Follow these steps to build and run Anakin in an SGX secure enclave.
9+
10+
1. Check out if your CPU and motherboard support SGX. Boot into your BIOS
11+
and see if there is an option controlling the availability of SGX. If
12+
there is such an option, turn it on.
13+
2. Download and Install Intel SGX SDK and driver. The software packages and
14+
documentation can be found at [Intel Open
15+
Source](https://01.org/intel-software-guard-extensions/downloads).
16+
3. Download and Install Intel MKL (not MKL-ML or MKL-DNN). You will need
17+
MKL 2019 Update 3. Older versions of MKL may cause problems like memory
18+
leak.
19+
4. Run the [SGX build script](../../tools/sgx_build.sh).
20+
5. If the build succeeds, you will find an executable called `anakin_app`
21+
under the `sgx_build/sgx` directory. The executable provides basic
22+
interfaces to help you quickly deploy a model and run some inference tasks.
23+
However, if you really need to use Anakin for SGX in production, you have to
24+
customize the ECALL/OCALL interfaces your self. the corresponding code can be
25+
found at [here](../../sgx).
26+
27+
## Support
28+
29+
SGX can be a complicated concept to understand for beginners. Feel free to
30+
submit any issues if you are interested in extra security but new to SGX. In
31+
case you are a systems developer and are knowledgeable about Intel chip
32+
technology, you may find this [paper](https://eprint.iacr.org/2016/086.pdf)
33+
helpful.
34+
35+
## Disclaimer
36+
37+
Anakin for SGX is still experimental and under active development. It is not
38+
extensively tested as on other platforms. Some operators and models may not be
39+
supported. Also, due to the limitations of the hardware, you will likely suffer
40+
from some performance degradation. You can report considerably slow cases to us
41+
to help improve Anakin for SGX.

0 commit comments

Comments
 (0)