secretflow / psi

The repo of Private Set Intersection(PSI) and Private Information Retrieval(PIR) from SecretFlow.
https://www.secretflow.org.cn/docs/psi
Apache License 2.0
26 stars 19 forks source link

[Bug]: import时报错illegal instruction #140

Closed Fissure45 closed 3 months ago

Fissure45 commented 3 months ago

Issue Type

Support

Modules Involved

SPU runtime

Have you reproduced the bug with SPU HEAD?

Yes

Have you searched existing issues?

Yes

SPU Version

spu 0.8.0b0

OS Platform and Distribution

no matter

Python Version

3.9

Compiler Version

No response

Current Behavior?

在海光7185cpu上运行spu时,import spu spu.psi会报错illegal instruction (core dumped),看起来缺少spu需要的指令集。在文档中我只看到需要avx2,该cpu是支持avx2的;能否提供更详细的spu所需指令集说明?

Standalone code to reproduce the issue

--

Relevant log output

No response

kaixin-haha commented 3 months ago

1.可以提供下cpu信息吗? 2.同时您有使用使用虚拟机吗?如果有使用的话,需要让虚拟机支持avx2 您可以参考下:https://github.com/secretflow/spu/issues/160

Fissure45 commented 3 months ago

我在服务器的docker容器中运行,没有使用虚拟机;出于一些原因我无法提供lscpu的完整截图,需要其他信息请详细指明 cpu型号为x86_64架构的Hygon C86 7185 32-core,支持的指令集为 606b50d06a3774719d037af5409f6ae

6fj commented 3 months ago

根据之前的issue,apsi需要avx512f。

ref: https://github.com/secretflow/spu/issues/167

Fissure45 commented 3 months ago

我在另外一台缺少avx512指令集的服务器上可以正常运行spu。这台服务器的cpu信息如下: image-20240615 两台服务器上使用了同样的docker镜像,在图中服务器import spu或者import spu.psi都不会报错;此外,我也没有使用apsi。

6fj commented 3 months ago

hi @Fissure45

我在寻找海光的机器验证你遇到的问题,请稍等~

6fj commented 3 months ago

Hi @Fissure45

我们没有海光7185,因此我在海光7265(avx, avx2)上进行了测试,没有发现你遇到的问题。 测试方式为

from spu import psi
Fissure45 commented 3 months ago

这个问题似乎仅限7185发生。我们在7285上进行测试没有问题,但两台7185都出现了这个问题。

6fj commented 3 months ago

由于我们没有海光7185,因此我们无法进行进一步处理。

如果可以的话,我们可能需要你这边提供机器。或者请向海光寻求技术支持。

Fissure45 commented 3 months ago

好的,感谢帮助。现在环境已经迁移,我也无法进行更多测试;看起来这是特定型号的cpu问题。