You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
Copy file name to clipboardExpand all lines: README.md
+30-18Lines changed: 30 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The __CHAM__ project is initiated by Alibaba DAMO Academy CTL and Ant Group's An
5
5
6
6
___CHAM___ is a customized homomorphic encryption accelerator for fast matrix-vector product. Homomorphic encryption (HE), enabling computation on encrypted data, suffers from poor performance due to enlarged data size and exploded amount of computation. Existing HE accelerators either target small HE operations or fail to support fast-evolving HE algorithms. To better support various privacy-preserving applications (e.g., logistic regression and neural-network inference), we propose CHAM for high-performance matrix-vector product, which can be easily extended to 2D/3D convolutions.
7
7
8
-
The code in this repository is released by Alibaba DAMO Academy CTL and Ant Group's AntChain under MIT License.
8
+
The code in this repository is released by Alibaba DAMO Academy CTL, Ant Group's AntChain and Ant Research under MIT License.
9
9
10
10
The distribution is developed as part of our DAC2023 paper called *"CHAM: A Customized Homomorphic Encryption Accelerator for Fast Matrix-Vector Product"*. This distribution is an open-source version of our commercial accelerator and not ready for production use.
11
11
@@ -25,30 +25,42 @@ The directory structure is as follows:
You need install Python3 and Vivado before simulation
34
+
35
+
If you use VCS, you may need to run as follows:
32
36
1. Generate xilinx vcs lib in ./xilinx_vcs_lib
33
37
2. Modify sim/vcs/tb_top.sh line 48 to your vcs path
34
38
3. cd sim
35
39
4. make clean //remove the previous run_dir
36
-
5. ./run_case <testname>//test name is showing below in Test cases
37
-
test_stg_0_0 test single stage at stage 0, and test only ksk ram init path
38
-
test_stg_0_1 test single stage at stage 0, and test only preprocess init path
39
-
test_stg_1 test single stage at stage 1
40
-
test_stg_2 test single stage at stage 2
41
-
test_stg_3 test single stage at stage 3
42
-
test_stg_4 test single stage at stage 4
43
-
test_stg_5 test single stage at stage 5
44
-
test_stg_6 test single stage at stage 6
45
-
test_stg_7 test single stage at stage 7
46
-
test_stg_8 test single stage at stage 8
47
-
test_stg_9 test single stage at stage 9
48
-
test_stg_10 test single stage at stage 10
49
-
test_row test all stages in a row
50
-
test_full_no_uram_4x4096 test full case, the test vector is 4x4096. we use testbench to init ksk ram instead of designtest_full_4x4096 test full case, the test vector is 4x4096.
51
-
test_full_4x4096 test full case, the test vector is 4x4096.
40
+
5. ./run_case <testname> //test name is showing below in Test cases
41
+
42
+
test_stg_0_0: test single stage at stage 0, and test only ksk ram init path
43
+
test_stg_0_1: test single stage at stage 0, and test only preprocess init path
44
+
test_stg_1: test single stage at stage 1
45
+
test_stg_2: test single stage at stage 2
46
+
test_stg_3: test single stage at stage 3
47
+
test_stg_4: test single stage at stage 4
48
+
test_stg_5: test single stage at stage 5
49
+
test_stg_6: test single stage at stage 6
50
+
test_stg_7: test single stage at stage 7
51
+
test_stg_8: test single stage at stage 8
52
+
test_stg_9: test single stage at stage 9
53
+
test_stg_10: test single stage at stage 10
54
+
test_row: test all stages in a row
55
+
test_full_no_uram_4x4096: test full case, the test vector is 4x4096. we use testbench to init ksk ram instead of design
56
+
test_full_4x4096: test full case, the test vector is 4x4096.
57
+
test_full_4x4096: test full case, the test vector is 4x4096.
58
+
59
+
If you use Vivado XSIM, you may need to run as follows:
`api_examples/demo_user_key.cc` 样例展示了使用 `api::ConvertUserKey` 接口直接利用用户已有的 SEAL 密钥进行运算。 如 H1 可以作为已有的 SEAL 应用的一部分;而无需生成新的密钥。减轻密钥管理的负担。即使既有的 SEAL 密钥是基于非 CKKS 方案也是可行的。
84
+
85
+
### Demo 4:
86
+
`python_example.py` 展示了 Python API 的使用。以联邦学习中为例子, 计算 mat*(vec0+vec1)+0.1*w.
0 commit comments