dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.01k stars 1.88k forks source link

libomp dependency is fragile #7061

Open ericstj opened 6 months ago

ericstj commented 6 months ago

I'm aware a few issues with our libomp dependency:

  1. We have to build libomp from source on x64 mac. We also have accompanying requirements https://github.com/dotnet/machinelearning/blob/main/docs/building/unix-instructions.md#macos
  2. We install the libomp package on M1, and that requires custom steps which occasionally break: https://github.com/dotnet/machinelearning/commit/59973fc2572532ecbcac35ac59fb8d1164cc4f8f
  3. The version of libomp that we bind to might be different than the one used by our dependencies - which causes runtime issues/warnings like: https://github.com/dotnet/machinelearning/issues/5569. @michaelgsharp I think you mentioned this can also occur on linux.

As much as possible we should try to have a "portable" dependency here where we can build / link against something that works in the most places and allows the platform/OS to choose the right version and all our components load that version - insofar as that's possible. We don't have such fragility for other platform dependencies.