pymc-devs / pytensor

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
https://pytensor.readthedocs.io
Other
300 stars 91 forks source link

ENH: Detect clang++ as a g++ alternative on Linux #762

Open mark-thm opened 2 months ago

mark-thm commented 2 months ago

Before

pytensor will only attempt to use g++ as a C++ compiler when running on Linux.

After

Improve pytensor by:

  1. If the CXX environment variable is set, use the value to determine the C++ compiler
  2. Discover g++ or clang++ on any platform

Context for the issue:

Today, pytensor will only discover g++ on Linux even though it can/will use clang++ on MacOS.

I'd be willing to propose a change here but wanted to gauge maintainer interest, first.

maresb commented 2 months ago

From my perspective this sounds great!

One challenge I see is that we're not running tests osx so we don't currently have test coverage for clang. There seem to be some bugs that should be fixed in any case. See for example #136.

ricardoV94 commented 1 month ago

Can you set the clang path in pytensor.config.cxx and it just works?