Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: 模拟不同网络环境后协议运行时间不变 #983

Open
c-doubley opened this issue Jan 23, 2025 · 5 comments
Open

[Question]: 模拟不同网络环境后协议运行时间不变 #983

c-doubley opened this issue Jan 23, 2025 · 5 comments

Comments

@c-doubley
Copy link

Feature Request Type

Build/Install

Have you searched existing issues?

Yes

Is your feature request related to a problem?

当我使用linux系统中的tc指令来模拟局域网和广域网时,尽管网速相差很大但是协议的运行时间几乎没有区别,我模拟的方式按照这个教程https://mp.weixin.qq.com/s/iV0wHKw7gDEr92CbeOwIZg

下面是我测试的子协议

 bazel test //libspu/mpc/aby3:protocol_test 

我使用了下面的指令确认带宽限制确实存在

# 终端1
iperf3 -s -i 1

# 终端2
iperf3 -c 127.0.0.1 -i 1 -t 10

Describe features you want to add to SPU

A clear and concise description of what you want to happen.

Describe features you want to add to SPU

A clear and concise description of any alternative solutions or features you've considered.

@w-gc
Copy link
Collaborator

w-gc commented Jan 23, 2025

bazel test //libspu/mpc/aby3:protocol_test跑的是单元测试,不走网络,用多线程模拟的多方:https://github.com/secretflow/spu/blob/main/src/libspu/mpc/utils/simulate.h

@c-doubley
Copy link
Author

那我要在哪一层进行测试可以走网络呢,有可以参考的吗?

@w-gc
Copy link
Collaborator

w-gc commented Jan 23, 2025

得在python层,比如https://github.com/secretflow/spu/blob/main/examples/python/ml/stax_nn/README.md,有个相应的json config文件配置端口什么的,这种才是会走网络。

@c-doubley
Copy link
Author

在python层好像是自动分配底层算子的?可以指定算子来测试吗

@w-gc
Copy link
Collaborator

w-gc commented Jan 23, 2025

SPU的lowering路径是相对固定且有限的,指定了MPC 协议基本就能走到你想要的那个MPC算子

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants