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

Unable to Convert YOLOv8 Models on MacOS Catalina #16

Closed
ProfessorHT opened this issue Apr 14, 2024 · 3 comments
Closed

Unable to Convert YOLOv8 Models on MacOS Catalina #16

ProfessorHT opened this issue Apr 14, 2024 · 3 comments

Comments

@ProfessorHT
Copy link

Hello,

When trying to convert YOLOv8 models on my Macbook Pro 2012 running MacOS Catalina with Anaconda Python 3.10.14 (with torch-2.1.0 CPU), I consistently encounter the following error:

RuntimeError: BlobWriter not loaded
[W NNPACK.cpp:64] Could not initialize NNPACK! Reason: Unsupported hardware.

System Details:

  • Macbook Pro 2012
  • Operating System: MacOS Catalina
  • Xcode Version: 12.4
  • Anaconda Configuration: Python 3.10.14, torch-2.1.0 CPU
  • Ultralytics Version: 1.47

I would greatly appreciate any guidance or assistance in resolving this issue.

Thank you in advance for your help.

@pderrenger
Copy link
Member

@ProfessorHT hello there! 🌟

It looks like you're encountering compatibility issues related to your hardware and the version of PyTorch you're using. Since your MacBook Pro is from 2012, NNPACK (which accelerates performance on mobile and other platforms) might not support your CPU. Here's a quick suggestion to try overcoming the error:

  1. Make sure PyTorch is properly installed for your system. Since you're using Anaconda, you might want to create a fresh environment and reinstall PyTorch to ensure it's the right version compatible with MacOS Catalina and your CPU architecture.
  2. Downgrade PyTorch to an earlier version that might have better support for older hardware. Sometimes, newer versions of libraries phase out support for older hardware. Running conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cpuonly -c pytorch in your Anaconda environment might help.
  3. Double-check that all other dependencies are up to date and compatible with the versions of Python and PyTorch you're using. A mismatch here can also lead to unexpected errors.

If after trying these steps you're still facing issues, it might be worth checking the compatibility of your hardware with the latest Ultralytics models and PyTorch versions. The documentation on https://docs.ultralytics.com might offer some additional guidance specific to hardware compatibility.

Keep us posted on your progress, and we're here to help with any further questions!

@ProfessorHT
Copy link
Author

Hello @pderrenger ,

Thank you for your response. I appreciate the suggestions.

I've tried downgrading PyTorch to version 1.7.1 as you recommended, but unfortunately, it didn't resolve the issue either. I understand Ultralytics requires PyTorch 1.8 or newer, so I attempted version 1.8, but encountered the same error.

Do you have any other propositions or suggestions on how to tackle this issue?

Thanks again for your assistance!

@pderrenger
Copy link
Member

Hello @ProfessorHT,

Thanks for the update and for trying those steps. Given the persistent issues, it might be beneficial to explore a couple more options:

  1. Verify PyTorch Compatibility: Ensure that PyTorch is indeed utilizing your CPU correctly by testing with a simple PyTorch script to see if it can perform basic operations without errors. Here’s a quick test:

    import torch
    x = torch.rand(5, 3)
    print(x)
  2. System Dependencies: Sometimes, system libraries need updating or specific versions to work with certain PyTorch builds. Check for any system updates available for MacOS Catalina that might affect compatibility.

  3. Alternative Approaches: If the issue persists, consider running your conversion tasks in a Docker container or a virtual machine that mimics a more compatible environment.

If these steps still don't resolve the issue, it might be helpful to look into the possibility of hardware limitations given the age of the MacBook Pro 2012, as some newer software updates and dependencies might not fully support older hardware.

Keep us posted on how it goes! 🌟

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

2 participants