DmitryUlyanov / Multicore-TSNE

Parallel t-SNE implementation with Python and Torch wrappers.
Other
1.88k stars 229 forks source link

Improved OpenMP support with Apple Clang #76

Closed ankane closed 2 years ago

ankane commented 4 years ago

Hi, thanks for this library!

This PR allows Multicore-TSNE to automatically detect OpenMP from Homebrew on Mac (brew install libomp) and should help with #40.

More info: https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html

A few notes on the changes:

Sample output

-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -Xclang -fopenmp (found suitable version "3.1", minimum required is "2") 
-- Found OpenMP: TRUE (found suitable version "3.1", minimum required is "2")  
-- Configuring done
-- Generating done
milianw commented 3 years ago

my PR contains a fix like this too, cf. https://github.com/DmitryUlyanov/Multicore-TSNE/pull/83/commits/c3f9604afec1f4b5133947cd2cce6030cdf37f82

imo the whole cmake file should be cleaned up, it's not worthwhile to keep compatibility with such an old cmake version