Coder Social home page Coder Social logo

Comments (7)

ClementPinard avatar ClementPinard commented on July 26, 2024

Hello,

this error does not seem related to this project but rather how to link openmp to a compiler in mac.
I found this issue, that you may find of interest : microsoft/LightGBM#3

My first guess would be to try to change the setup.py at line 26 so that the extra_compile_arg['cxx'] is -openmprather than-fopenmp` .

from pytorch-correlation-extension.

kkew3 avatar kkew3 commented on July 26, 2024

Thanks for your reply. I changed -fopenmp to -openmp. Now there are two more errors:

clang: error: no such file or directory: 'build/temp.macosx-10.9-x86_64-3.6/Correlation_Module/correlation.o'
clang: error: no such file or directory: 'build/temp.macosx-10.9-x86_64-3.6/Correlation_Module/correlation_sampler.o'
error: command 'clang++' failed with exit status 1

I found the two underlying cpp files under Correlation_Module. How should I get them compiled?

Thanks!

from pytorch-correlation-extension.

ClementPinard avatar ClementPinard commented on July 26, 2024

seems like some interferences with you previous attempt at building. I'd say completely remove the build folder and and start over.

from pytorch-correlation-extension.

kkew3 avatar kkew3 commented on July 26, 2024

Thanks for your reply. No it reoccurs even after rebuilding. Here's the whole stdout and stderr (attached build.out.txt). Thanks!

build.out.txt

from pytorch-correlation-extension.

kkew3 avatar kkew3 commented on July 26, 2024

I solved the issue by changing back -openmp to -fopenmp and installed /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg (as per this answer).

However, when I run python grad_check.py cpu, it gives another error:

Traceback (most recent call last):
  File "check.py", line 8, in <module>
    from spatial_correlation_sampler import SpatialCorrelationSampler
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/spatial_correlation_sampler-0.1.0-py3.6-macosx-10.9-x86_64.egg/spatial_correlation_sampler/__init__.py", line 1, in <module>
    from .spatial_correlation_sampler import SpatialCorrelationSampler, SpatialCorrelationSamplerFunction, spatial_correlation_sample
  File "$VIRTUAL_ENV/lib/python3.6/site-packages/spatial_correlation_sampler-0.1.0-py3.6-macosx-10.9-x86_64.egg/spatial_correlation_sampler/spatial_correlation_sampler.py", line 6, in <module>
    import spatial_correlation_sampler_backend as correlation
ImportError: dlopen($VIRTUAL_ENV/lib/python3.6/site-packages/spatial_correlation_sampler-0.1.0-py3.6-macosx-10.9-x86_64.egg/spatial_correlation_sampler_backend.cpython-36m-darwin.so, 2): Symbol not found: __Z24correlation_cuda_forwardN2at6TensorES0_iiiiiiiiii
  Referenced from: $VIRTUAL_ENV/lib/python3.6/site-packages/spatial_correlation_sampler-0.1.0-py3.6-macosx-10.9-x86_64.egg/spatial_correlation_sampler_backend.cpython-36m-darwin.so
  Expected in: flat namespace
 in $VIRTUAL_ENV/lib/python3.6/site-packages/spatial_correlation_sampler-0.1.0-py3.6-macosx-10.9-x86_64.egg/spatial_correlation_sampler_backend.cpython-36m-darwin.so

It seems that somehow the cpp file still needs certain cuda component. How to solve it? Thanks for any suggestions!

from pytorch-correlation-extension.

ClementPinard avatar ClementPinard commented on July 26, 2024

I just pushed changes, you can get the last version (tagged 0.2.0) and try to install with setup_cpu.py instead of setup.py

from pytorch-correlation-extension.

kkew3 avatar kkew3 commented on July 26, 2024

Thank you so much!

from pytorch-correlation-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.