question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Conda package for M1 MacBook

See original GitHub issue

🚀 Feature

Motivation

Hello, several ML/DL packages are providing direct M1 chip (just CPU) support through conda now e.g., pytorch/osx-arm64, I looked around the issues page and discuss.dgl.ai, and I couldn’t find a issue tracking this, so I decided to open an issue by myself. Is there a plan to support M1 chip (just CPU) on dglteam channel?

Alternatives

  • Compile from source
  • Use x86 conda through rosetta2 emulation, this alternative used to work fine 3-5 months ago but running into issues recently 🙁

Pitch

  • Support osx-arm64 packages on dglteam conda channel
  • I’m happy to help in anyway regarding this, I see the build recipes are within dgl repo and the build is triggered on Jenkins

Additional context

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
apalhacommented, Jun 14, 2022

Hi! I am also trying to compile DGL from source on a mac M1 and I run into issues related to deprecated sem_init. I have followed the instructions for compiling in Install from source -> MacOS and I am using clang version 13.0.0 (clang-1300.0.29.30).

During compilation I get the following error:

[ 71%] Building CXX object CMakeFiles/dgl.dir/src/runtime/c_object_api.cc.o
[ 73%] Building CXX object CMakeFiles/dgl.dir/src/runtime/c_runtime_api.cc.o
[ 73%] Building CXX object CMakeFiles/dgl.dir/src/runtime/cpu_device_api.cc.o
[ 73%] Building CXX object CMakeFiles/dgl.dir/src/runtime/dso_module.cc.o
[ 74%] Building CXX object CMakeFiles/dgl.dir/src/runtime/file_util.cc.o
[ 74%] Building CXX object CMakeFiles/dgl.dir/src/runtime/module.cc.o
[ 74%] Building CXX object CMakeFiles/dgl.dir/src/runtime/module_util.cc.o
[ 75%] Building CXX object CMakeFiles/dgl.dir/src/runtime/ndarray.cc.o
[ 75%] Building CXX object CMakeFiles/dgl.dir/src/runtime/object.cc.o
[ 75%] Building CXX object CMakeFiles/dgl.dir/src/runtime/registry.cc.o
[ 75%] Building CXX object CMakeFiles/dgl.dir/src/runtime/resource_manager.cc.o
[ 76%] Building CXX object CMakeFiles/dgl.dir/src/runtime/semaphore_wrapper.cc.o
/Users/apalha/work/libs/dgl/src/runtime/semaphore_wrapper.cc:45:3: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
  sem_init(&sem_, 0, 0);
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/sys/cdefs.h:204:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((__deprecated__))
                                       ^
/Users/apalha/work/libs/dgl/src/runtime/semaphore_wrapper.cc:73:17: error: use of undeclared identifier 'sem_timedwait'
  while ((ret = sem_timedwait(&sem_, &ts) != 0) && errno == EINTR) {
                ^
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/dgl.dir/src/runtime/semaphore_wrapper.cc.o] Error 1
make[1]: *** [CMakeFiles/dgl.dir/all] Error 2
make: *** [all] Error 2

Thank you for your help.

-artur palha

3reactions
itchingpixelscommented, Apr 28, 2022

@luisaforozco : ohh I also got this… for the first time, then the second time, repeating the compilation + python setup.py install, it worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New Release: Anaconda Distribution Now Supporting M1
The 2022.05 release of Anaconda Distribution features native compiling for Apple M1's ARM64 architecture (boasting 20% faster compute), ...
Read more >
How to Manage Conda Environments on an Apple Silicon M1 ...
It allows you to maintain separate environments for different projects — each environment can contain different packages, different package ...
Read more >
Installing on macOS - Conda
Download the installer: Miniconda installer for macOS. · Verify your installer hashes. · Install: Miniconda---In your terminal window, run: · Follow the prompts...
Read more >
Anaconda and upgrading to new M1 Mac - Stack Overflow
This will install an M1 native conda, and that conda's default environment will by default install M1 native python versions and M1 native ......
Read more >
Conda on M1 Mac with Miniforge - Ryan - Medium
With Apple's new M1 architecture based on ARM64, Anaconda does not support M1 natively yet. So to utilize full performance of M1, we're...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found