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

clip.load segmentation fault #490

Open
SylviaZiyuZhang opened this issue Mar 13, 2025 · 0 comments
Open

clip.load segmentation fault #490

SylviaZiyuZhang opened this issue Mar 13, 2025 · 0 comments

Comments

@SylviaZiyuZhang
Copy link

SylviaZiyuZhang commented Mar 13, 2025

Code block

print(f"Prepare to load clip, {model}, {device}")
self.embedding_model, self.preprocessor = clip.load("ViT-L/14", "cpu")
print("Load clip")

Output

Prepare to load clip, ViT-L/14, cpu
zsh: segmentation fault  python evaluate.py

This only happens when clip is loaded in this OOP setting. This is the only ML model used in the software. Everything works normal in interactive shell.

Architecture and OS: macOS Sonoma (arm64)
Dependencies:
Python 3.11.8
Torch 2.6.0
Clip 1.0

lldb disassembly output:

Process 2008 stopped
* thread #4, stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
    frame #0: 0x0000000101919828 libomp.dylib`void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 44
libomp.dylib`__kmp_suspend_64<false, true>:
->  0x101919828 <+44>: ldr    x19, [x8, w0, sxtw #3]
    0x10191982c <+48>: mov    x0, x19
    0x101919830 <+52>: bl     0x101918dc8               ; __kmp_suspend_initialize_thread
    0x101919834 <+56>: add    x20, x19, #0x540
  thread #5, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x0000000101919828 libomp.dylib`void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 44
libomp.dylib`__kmp_suspend_64<false, true>:
->  0x101919828 <+44>: ldr    x19, [x8, w0, sxtw #3]
    0x10191982c <+48>: mov    x0, x19
    0x101919830 <+52>: bl     0x101918dc8               ; __kmp_suspend_initialize_thread
    0x101919834 <+56>: add    x20, x19, #0x540
  thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
    frame #0: 0x0000000101919828 libomp.dylib`void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 44
libomp.dylib`__kmp_suspend_64<false, true>:
->  0x101919828 <+44>: ldr    x19, [x8, w0, sxtw #3]
    0x10191982c <+48>: mov    x0, x19
    0x101919830 <+52>: bl     0x101918dc8               ; __kmp_suspend_initialize_thread
    0x101919834 <+56>: add    x20, x19, #0x540
Target 0: (python) stopped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant