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

Fix Metal Support #95

Merged
merged 3 commits into from
Jun 10, 2023
Merged

Fix Metal Support #95

merged 3 commits into from
Jun 10, 2023

Commits on Jun 10, 2023

  1. Update llama.o and common.o to use build dir

    Making these libraries outside of the build directory causes them to
    have no knowledge that we're using metal. This prevents metal
    acceleration from working. Using the cmake build directory fixes this
    issue.
    soleblaze committed Jun 10, 2023
    Configuration menu
    Copy the full SHA
    2112523 View commit details
    Browse the repository at this point in the history
  2. Update Metal Example to work correctly

    This example failed to load metal due to it missing the SetGPULayers
    option.
    
    I also updated the instructions to use go build instead of go run. This
    is due to go run not loading the ggml-metal.metal file. I was unable to
    get this working. Compiling it and running ./main will load the
    ggml-metal.metal file in the CWD.
    soleblaze committed Jun 10, 2023
    Configuration menu
    Copy the full SHA
    26af152 View commit details
    Browse the repository at this point in the history
  3. Update test to use CGO_LDFLAGS

    For this to compile properly using metal we need to set some CGO_LDFLAGS
    so it can find the appropriate frameworks.
    soleblaze committed Jun 10, 2023
    Configuration menu
    Copy the full SHA
    678de33 View commit details
    Browse the repository at this point in the history