Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help-wanted] use ray_pyembree in Apple Silicon M1 #1601

Open
YuanWenqing opened this issue Jun 7, 2022 · 6 comments
Open

[help-wanted] use ray_pyembree in Apple Silicon M1 #1601

YuanWenqing opened this issue Jun 7, 2022 · 6 comments

Comments

@YuanWenqing
Copy link
Contributor

YuanWenqing commented Jun 7, 2022

I installed pyembree in MBP M1 according to https://github.com/mikedh/trimesh/blob/main/docker/builds/embree.bash , but importing failed:

python -c 'import trimesh.ray.ray_pyembree'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "../python3.8/site-packages/trimesh/ray/ray_pyembree.py", line 10, in <module>
    from pyembree import rtcore_scene
ImportError: dlopen(../python3.8/site-packages/pyembree/rtcore_scene.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_rtcCommit'

I guess the reason is that embree-2.17.7.x86_64.macosx.tar.gz was compiled in x86_64. Running embree in Rosetta in some way may work, but I've no idea how.

Could anyone help?

@YuanWenqing YuanWenqing changed the title use ray_pyembree in Apple Silicon M1 [help-wanted] use ray_pyembree in Apple Silicon M1 Jun 7, 2022
@YuanWenqing
Copy link
Contributor Author

It seems [email protected] under arm64 not works but [email protected] under x86_64 works

@mikedh
Copy link
Owner

mikedh commented Jun 7, 2022

Hey, embree is intel's raytracer that they designed to show off the fancy features of their x86_64 processors (they only release for x86_64), I think embree is extremely unlikely to ever build on an ARM of any kind.

I think a better bet would be adding another ray-query backend (PR's welcome!), ideally one that was a little simpler and written in C/C++, maybe something sort of like pyoctree, although that hasn't had any commits in the last 5 years.

@YuanWenqing
Copy link
Contributor Author

Embree added support for Apple M1 CPUs since 3.13.0 .
I see #1108 using embree3 and python-embree but now closed. Would it go further?

@mikedh
Copy link
Owner

mikedh commented Jun 8, 2022 via email

@YuanWenqing
Copy link
Contributor Author

Thanks for responses. Looking forward to that.

@schlegelp
Copy link

I'd consider using ncollpyde. It's fast (wraps Rust) and has universal wheels (i.e. installs easily on all platforms).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants