冰椰醇(岩芯倾倒)。是AVX问题吗?

2024-05-12 20:57:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用python中的pycotools:

$ ipython
Python 3.6.5 | packaged by conda-forge | (default, Apr  6 2018, 13:39:56) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pycocotools.coco import COCO
Segmentation Error (core dumped)

这是否与我的CPU缺少AVX指令(xeon E5520)有关?在


Tags: ordefaultforbylicensemoretypeipython
2条回答

如果您的程序试图在不支持AVX指令的CPU上执行它们,那么在Linux这样的操作系统上会得到SIGILL(非法指令)。在

因为“错误”总是“错误的”。在运行时选择的非AVX版本的代码中,可能存在bug或更严格的对齐要求;对于在AVX CPU上工作的代码和没有AVX的segfaulting来说,运行时调度是一种合理的机制。在

如果pycocotools与编译的部分有问题,请运行

  • pip uninstall -y pycocotools
  • pip install no-binary :all: pycocotools

这应该编译机器上pycoctools附带的C代码。在

相关问题 更多 >