Skip to content

Commit

Permalink
opencl: Clean up small-alloc in CMake files
Browse files Browse the repository at this point in the history
  • Loading branch information
lhez authored and max-krasnyansky committed Dec 3, 2024
1 parent e872f8a commit 3e74c27
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions ggml/src/ggml-opencl2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ if (OpenCL_FOUND)

add_compile_definitions(GGML_OPENCL_SOA_Q)

if (GGML_OPENCL_SMALL_ALLOC)
message(STATUS "OpenCL will allocate a separate buffer for each tensor. "
"The default behavior allocates a large buffer to hold multiple tensors.")
add_compile_definitions(GGML_OPENCL_SMALL_ALLOC)
endif ()

if (GGML_OPENCL_USE_ADRENO_KERNELS)
message(STATUS "OpenCL will use matmul kernels optimized for Adreno")
add_compile_definitions(GGML_OPENCL_USE_ADRENO_KERNELS)
Expand Down
9 changes: 0 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ add_library(llama
unicode-data.cpp
)

# TODO: This is intrusive. We intend to remove SMALL_ALLOC path once the we fully
# migrate to the non SMALL_ALLOC path.
if (GGML_OPENCL)
add_compile_definitions(GGML_USE_OPENCL)
if (GGML_OPENCL_SMALL_ALLOC)
add_compile_definitions(GGML_OPENCL_SMALL_ALLOC)
endif ()
endif ()

target_include_directories(llama PUBLIC . ../include)
target_compile_features (llama PUBLIC cxx_std_17) # don't bump

Expand Down
1 change: 1 addition & 0 deletions tests/test-backend-ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ struct test_case {
// post-graph sentinel
add_sentinel(ctx);

// allocate
ggml_backend_buffer_t buf = ggml_backend_alloc_ctx_tensors(ctx, backend1);
if (buf == NULL) {
printf("failed to allocate tensors [%s] ", ggml_backend_name(backend1));
Expand Down

0 comments on commit 3e74c27

Please sign in to comment.