smartnoise-sdk icon indicating copy to clipboard operation
smartnoise-sdk copied to clipboard

Not compatible with Apple's M1 chip?

Open youny626 opened this issue 3 years ago • 1 comments

I tried to run SQL Queries.ipynb in sql/samples/, but had the following error when executing the DP query:

OSError: dlopen(/xxx/smartnoise-sdk/venv/lib/python3.8/site-packages/opendp/lib/libopendp_ffi.dylib, 0x0006): tried: '/xxx/smartnoise-sdk/venv/lib/python3.8/site-packages/opendp/lib/libopendp_ffi.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libopendp_ffi.dylib' (no such file), '/usr/lib/libopendp_ffi.dylib' (no such file)

I am using Python 3.8, macOS Monterey, with M1 pro chip.

youny626 avatar Dec 09 '21 00:12 youny626

from @joshua-oss:

Right, the builds for the OpenDP core library are not currently working on M1. The main issue is that the GMP/MPFR dependencies are not finding the right target when Rust calls out to the C++ compiler. We will investigate.

SmartNoise and OpenDP both work on M1 using Rosetta (e.g. on miniconda installed from the MacOS x86-64 package). On my M1 MBP, the Rosetta python and SmartNoise is substantially faster than on my Intel MBP, but of course slower than it will be when we have proper M1 support.

raprasad avatar Dec 09 '21 13:12 raprasad

@raprasad I'm running into this same issue on M1 ULTRA cpu chip. Using Python 3.9.6.

Is there a fix yet, or should I attempt to use Rosetta ?

nocrates avatar Sep 30 '22 00:09 nocrates

This issue is because the SDK has a dependency on OpenDP 0.4. OpenDP 0.5 supports M1, so at this point we just need an update to the SDK to support OpenDP 0.5. Relevant OpenDP issue: https://github.com/opendp/opendp/pull/441

Shoeboxam avatar Sep 30 '22 00:09 Shoeboxam

We've just released smartnoise-sql==0.2.5 with support for OpenDP v0.5.0 and Apple Silicon. The synthesizers package still has a dependency on ctgan, which doesn't work on Apple Silicon.

joshua-oss avatar Oct 02 '22 18:10 joshua-oss

We've just released smartnoise-sql==0.2.5 with support for OpenDP v0.5.0 and Apple Silicon. The synthesizers package still has a dependency on ctgan, which doesn't work on Apple Silicon.

I just tried the new version without using rosetta mode and it worked (with noticeable speedup)! Thanks a lot!

youny626 avatar Oct 03 '22 00:10 youny626

We've just released smartnoise-sql==0.2.5 with support for OpenDP v0.5.0 and Apple Silicon. The synthesizers package still has a dependency on ctgan, which doesn't work on Apple Silicon.

I just tried the new version without using rosetta mode and it worked (with noticeable speedup)! Thanks a lot!

I have confirmed as well! smartnoise-sql working like a charm on Apple Silicon without Rosetta. Thank you!

nocrates avatar Oct 03 '22 16:10 nocrates