-
Notifications
You must be signed in to change notification settings - Fork 108
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
[Feature]: 在SPU中新增协议 #922
Comments
简单来说,只能支持加减;乘法也得看你是不是实现了trunc;至于其他数学函数,如exp,log等,也是完全跑不了 |
参考spdz2k,把下面的算术算子都实现了 |
几乎所有数学函数都强依赖a2b,因为要做range reduction |
好的,感谢您的解答 |
Hello!!!, i am curious about why the following a2b needs to generate r0 and r1? According to my understanding, the a2b here can be converted locally to execute the subsequent msb operations by different parties, and r0 and r1 are not transfered to other parties ,so why we need to generate two random numbers. could you please give me some advice, thanks!!! NdArrayRef A2B::proc(KernelEvalContext* ctx, const NdArrayRef& x) const { std::vector bshrs;
} NdArrayRef res = vreduce(bshrs.begin(), bshrs.end(), NdArrayRef A2B::proc(KernelEvalContext* ctx, const NdArrayRef& x) const { std::vector bshrs;
} NdArrayRef res = vreduce(bshrs.begin(), bshrs.end(), |
#916 may help. |
你好,我的协议中的算术单元测试已经通过了,然后我写好了配置文件,在example/python目录下新增testProto.py文件来测试我的新协议,目前加法,数乘以及求反等都可以实现,但是在进行秘密乘法的时候出现了超时的报错。
上面是启动的SPU后台的报错信息,下面是testProto中的报错信息
|
有几个可能性可以自查一下:
|
下面是配置4pc.json
看起来和乘法相关的很多算子都没有通过api测试,下面是ArithmeticTest的结果
|
确实有点奇怪,,不过看调用栈问题大概率是mulaa实现里的。 个人建议可以加一点简单的log定位一下是哪个数据没有recv到,是不是哪里数据收发死锁了,,毕竟你这个协议party数比较多,不确定是否每次运行都是稳定的? |
之前有过发送接收写错了的问题,这时候ArithmeticTest.mulAA会无法通过测试,所以我简单的以为通过了ArithmeticTest.mulAA测试之后应该没有这种问题了,我再重新检查mulaa实现看是否能找到问题,感谢您的回答 |
我按照问题[#863 ]中的指示,写了一个哈希的调用,但是出现了一些奇怪的问题 |
Stale issue message. Please comment to remove stale tag. Otherwise this issue will be closed soon. |
Feature Request Type
Build/Install
Have you searched existing issues?
Yes
Is your feature request related to a problem?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
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
在SPU中添加新协议的时候有一个API测试,包含了算术算子,布尔算子以及算术和布尔的转化,但是我现在想新增一个协议,这个协议只包含算术运算的算子,如果这样做的话,在上层调用的时候是不是会容易报错,我想知道哪些操作可能会导致报错。
比如在上层进行一个简单神经网络训练,在什么情况下可能会调用到底层布尔算子,这是可以避免的吗,比如仅使用算术算子来完成一个模型训练,这是可以人为在上层控制的吗,还是一定会有某些计算会涉及到布尔的算子呢
The text was updated successfully, but these errors were encountered: