Skip to content

Commit

Permalink
ggml backends interface v1 (#547)
Browse files Browse the repository at this point in the history
* ggml backends interface v1

* ggml-backend : metal (#552)

---------

Co-authored-by: Georgi Gerganov <[email protected]>
  • Loading branch information
slaren and ggerganov committed Oct 6, 2023
1 parent 4a771d5 commit fc9e955
Show file tree
Hide file tree
Showing 14 changed files with 1,414 additions and 259 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build-sanitize-thread/
build-cov/
build-ci-debug/
build-ci-release/
build-cublas/
out/
tmp/
models/
Expand All @@ -15,6 +16,7 @@ compile_commands.json
CMakeSettings.json
.vs/
.vscode/
.clangd

.exrc
.cache
Expand All @@ -32,4 +34,4 @@ zig-cache/

*.sw?

__pycache__/
__pycache__/
15 changes: 15 additions & 0 deletions examples/gpt-2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,18 @@ target_link_libraries(${TEST_TARGET} PRIVATE ggml common common-ggml)
set(TEST_TARGET gpt-2-quantize)
add_executable(${TEST_TARGET} quantize.cpp)
target_link_libraries(${TEST_TARGET} PRIVATE ggml common common-ggml)

#
# For GPU offloading

if (GGML_CUBLAS)
add_compile_definitions(GGML_USE_CUBLAS)
endif()

if (GGML_CLBLAST)
add_compile_definitions(GGML_USE_CLBLAST)
endif()

if (GGML_METAL)
add_compile_definitions(GGML_USE_METAL)
endif()
Loading

0 comments on commit fc9e955

Please sign in to comment.