Skip to content

Commit

Permalink
feat: add cross-compilation flags for clang MacOS targets
Browse files Browse the repository at this point in the history
  • Loading branch information
oxidase committed Jun 21, 2024
1 parent e8c52b0 commit c2856fc
Show file tree
Hide file tree
Showing 13 changed files with 300 additions and 153 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- name: Show info
id: info
run: |
uname -a
python3 -V
bazel info
shell: bash
Expand Down
199 changes: 149 additions & 50 deletions examples/cc_toolchain/poetry.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion examples/cc_toolchain/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
import pytest

import llama_cpp
from llama_cpp.llama_cpp import _lib as llama_lib
from llama_cpp.llama_cpp import _lib_base_name as lib_base_name
from llama_cpp.llama_cpp import _load_shared_library as load_shared_library


def test_llama_version():
dependencies = tomllib.load(open("poetry.lock", "rb"))
locked = next((package for package in dependencies["package"] if package["name"] == "llama-cpp-python"), None)
assert locked["version"] == llama_cpp.version.__version__
assert locked["version"] == llama_cpp.__version__

assert llama_cpp.llama_max_devices() > 0


def test_llama_library_rpath():
assert llama_lib
lib = load_shared_library(lib_base_name)
assert llama_lib._name == lib._name
with open(lib._name, "rb") as handle:
assert b"bazel-out/" in handle.read()

Expand Down
12 changes: 6 additions & 6 deletions examples/markers/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions examples/simple/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 42 additions & 39 deletions examples/torch/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions examples/transitions/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c2856fc

Please sign in to comment.