Skip to content

Commit 99f901a

Browse files
committed
llama+metal: python bindings work
`ggml-metal.metal` is now searched for next to the .so/.dylib by adding ggml-org/llama.cpp#1782 to our fork.
1 parent d782f2b commit 99f901a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Diff for: gpt4all-bindings/python/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def copy_prebuilt_C_lib(src_dir, dest_dir, dest_build_dir):
4444
d = os.path.join(dest_dir, item)
4545
shutil.copy2(s, d)
4646
files_copied += 1
47-
if item.endswith(lib_ext):
47+
if item.endswith(lib_ext) or item.endswith('.metal'):
4848
s = os.path.join(dirpath, item)
4949
d = os.path.join(dest_build_dir, item)
5050
shutil.copy2(s, d)
@@ -88,4 +88,4 @@ def copy_prebuilt_C_lib(src_dir, dest_dir, dest_build_dir):
8888
},
8989
package_data={'llmodel': [os.path.join(DEST_CLIB_DIRECTORY, "*")]},
9090
include_package_data=True
91-
)
91+
)

Diff for: gpt4all-chat/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ if(METAL_SHADER_FILE)
142142
set_target_properties(chat PROPERTIES
143143
RESOURCE ${METAL_SHADER_FILE}
144144
)
145+
configure_file(${METAL_SHADER_FILE} bin/ggml-metal.metal COPYONLY)
145146
endif()
146147

147148
target_compile_definitions(chat

0 commit comments

Comments
 (0)