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

ModuleNotFoundError: No module named 'peachpy.x86_64.avx' #113

Closed
adamjstewart opened this issue Jun 16, 2021 · 1 comment
Closed

ModuleNotFoundError: No module named 'peachpy.x86_64.avx' #113

adamjstewart opened this issue Jun 16, 2021 · 1 comment

Comments

@adamjstewart
Copy link

I'm trying to build NNPACK, which has a git submodule for PeachPy (the master branch). When I try to build NNPACK, I see the following error:

[60/162] cd /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-build-je5psrf && PYTHONPATH=/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/six:/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/peachpy /home/t-astewart/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.8.10-owirpnfxjurir472qs6zmrfzcuj7ruiv/bin/python -m peachpy.x86_64 -mabi=sysv -g4 -mimage-format=elf -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src/x86_64-fma -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/fp16/include -o /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-build-je5psrf/src/x86_64-fma/2d-fourier-8x8.py.o /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src/x86_64-fma/2d-fourier-8x8.py
FAILED: src/x86_64-fma/2d-fourier-8x8.py.o 
cd /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-build-je5psrf && PYTHONPATH=/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/six:/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/peachpy /home/t-astewart/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.8.10-owirpnfxjurir472qs6zmrfzcuj7ruiv/bin/python -m peachpy.x86_64 -mabi=sysv -g4 -mimage-format=elf -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src/x86_64-fma -I/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/fp16/include -o /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-build-je5psrf/src/x86_64-fma/2d-fourier-8x8.py.o /tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/src/x86_64-fma/2d-fourier-8x8.py
Traceback (most recent call last):
  File "/home/t-astewart/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.8.10-owirpnfxjurir472qs6zmrfzcuj7ruiv/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/t-astewart/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.8.10-owirpnfxjurir472qs6zmrfzcuj7ruiv/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/t-astewart/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.8.10-owirpnfxjurir472qs6zmrfzcuj7ruiv/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/peachpy/peachpy/x86_64/__init__.py", line 25, in <module>
    from peachpy.x86_64.function import Function, LocalVariable
  File "/tmp/t-astewart/spack-stage/spack-stage-nnpack-2020-12-21-je5psrf5ddgan2oqx3hnqbuqs4zybuaw/spack-src/deps/peachpy/peachpy/x86_64/function.py", line 16, in <module>
    import peachpy.x86_64.avx
ModuleNotFoundError: No module named 'peachpy.x86_64.avx'

Do you have any idea what could cause this? I've seen #93 and pytorch/pytorch#9257 but didn't find a solution. I also opened an issue with the NNPACK developers at Maratyszcza/NNPACK#203.

@adamjstewart
Copy link
Author

Resolved. There's a bug in NNPACK where if you specify your own source directory for PeachPy it doesn't run python setup.py generate, so the avx.py file never gets generated.

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

1 participant