Skip to content

Commit 006b1f4

Browse files
committed
Code clean-up: removed unused functions
1 parent 9324c76 commit 006b1f4

File tree

2 files changed

+17
-52
lines changed

2 files changed

+17
-52
lines changed

ggml/src/ggml-vulkan/CMakeLists.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,24 @@ if (Vulkan_FOUND)
6767

6868
# Test all shader extensions
6969
if (NOT GGML_VULKAN_DISABLE_COOPMAT)
70-
test_shader_extension_support(
71-
"GL_KHR_cooperative_matrix"
72-
"${CMAKE_CURRENT_SOURCE_DIR}/vulkan-shaders/feature-tests/coopmat.comp"
73-
"GGML_VULKAN_COOPMAT_GLSLC_SUPPORT"
74-
)
75-
else()
76-
message(STATUS "VK_KHR_cooperative_matrix support disabled by GGML_VULKAN_DISABLE_COOPMAT")
77-
endif()
70+
test_shader_extension_support(
71+
"GL_KHR_cooperative_matrix"
72+
"${CMAKE_CURRENT_SOURCE_DIR}/vulkan-shaders/feature-tests/coopmat.comp"
73+
"GGML_VULKAN_COOPMAT_GLSLC_SUPPORT"
74+
)
75+
else()
76+
message(STATUS "VK_KHR_cooperative_matrix support disabled by GGML_VULKAN_DISABLE_COOPMAT")
77+
endif()
7878

79-
if (NOT GGML_VULKAN_DISABLE_COOPMAT2)
80-
test_shader_extension_support(
81-
"GL_NV_cooperative_matrix2"
82-
"${CMAKE_CURRENT_SOURCE_DIR}/vulkan-shaders/feature-tests/coopmat2.comp"
83-
"GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT"
84-
)
85-
else()
86-
message(STATUS "VK_NV_cooperative_matrix2 support disabled by GGML_VULKAN_DISABLE_COOPMAT2")
87-
endif()
79+
if (NOT GGML_VULKAN_DISABLE_COOPMAT2)
80+
test_shader_extension_support(
81+
"GL_NV_cooperative_matrix2"
82+
"${CMAKE_CURRENT_SOURCE_DIR}/vulkan-shaders/feature-tests/coopmat2.comp"
83+
"GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT"
84+
)
85+
else()
86+
message(STATUS "VK_NV_cooperative_matrix2 support disabled by GGML_VULKAN_DISABLE_COOPMAT2")
87+
endif()
8888

8989
test_shader_extension_support(
9090
"GL_EXT_integer_dot_product"

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9787,10 +9787,6 @@ static void ggml_vk_silu_back(ggml_backend_vk_context * ctx, vk_context& subctx,
97879787
ggml_vk_op_f32<vk_op_push_constants>(ctx, subctx, src0, src1, nullptr, nullptr, dst, GGML_OP_SILU_BACK, { (uint32_t)ggml_nelements(src0), 0, 0.0f, 0.0f });
97889788
}
97899789

9790-
static void ggml_vk_geglu_back(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst, bool dryrun = false) {
9791-
ggml_vk_op_f32<vk_op_push_constants>(ctx, subctx, src0, src1, nullptr, dst, GGML_OP_GEGLU_BACK, { (uint32_t)ggml_nelements(src0), 0, 0.0f, 0.0f }, dryrun);
9792-
}
9793-
97949790
static void ggml_vk_norm(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, ggml_tensor * dst) {
97959791
float * op_params = (float *)dst->op_params;
97969792

@@ -10022,19 +10018,6 @@ static void ggml_vk_diag_mask_inf(ggml_backend_vk_context * ctx, vk_context& sub
1002210018
ggml_vk_op_f32<vk_op_diag_mask_push_constants>(ctx, subctx, src0, nullptr, nullptr, nullptr, dst, GGML_OP_DIAG_MASK_INF, { (uint32_t)src0->ne[0], (uint32_t)src0->ne[1], op_params[0] });
1002310019
}
1002410020

10025-
static void ggml_vk_cross_entropy_loss_back(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, const ggml_tensor * src1, const ggml_tensor * src2, ggml_tensor * dst, bool dryrun = false) {
10026-
const int64_t nclasses = src1->ne[0];
10027-
const int64_t nrows = ggml_nrows(src1);
10028-
10029-
ggml_vk_op_f32<vk_op_push_constants>(ctx, subctx, src0, src1, src2, dst, GGML_OP_CROSS_ENTROPY_LOSS_BACK, {
10030-
(uint32_t)nclasses,
10031-
(uint32_t)nrows,
10032-
0.0f,
10033-
0.0f
10034-
}, dryrun);
10035-
10036-
}
10037-
1003810021
static void ggml_vk_soft_max(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, const ggml_tensor * src1, const ggml_tensor * src2, ggml_tensor * dst) {
1003910022
float * op_params = (float *)dst->op_params;
1004010023

@@ -10190,24 +10173,6 @@ static void ggml_vk_count_equal(ggml_backend_vk_context * ctx, vk_context& subct
1019010173
ggml_vk_op_f32<vk_op_push_constants>(ctx, subctx, src0, src1, nullptr, nullptr, dst, GGML_OP_COUNT_EQUAL, { (uint32_t)ggml_nelements(src0), 0, 0.0f, 0.0f });
1019110174
}
1019210175

10193-
static void ggml_vk_out_prod(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst, bool dryrun = false) {
10194-
const uint32_t src0_type_size = ggml_type_size(src0->type);
10195-
const uint32_t src1_type_size = ggml_type_size(src1->type);
10196-
const uint32_t dst_type_size = ggml_type_size(dst->type);
10197-
10198-
const int64_t r2 = src1->ne[2] / src0->ne[2];
10199-
const int64_t r3 = src1->ne[3] / src0->ne[3];
10200-
10201-
ggml_vk_op_f32<vk_op_binary_push_constants>(ctx, subctx, src0, src1, nullptr, dst, GGML_OP_OUT_PROD, {
10202-
(uint32_t)ggml_nelements(dst),
10203-
(uint32_t)src0->ne[0], (uint32_t)src0->ne[1], (uint32_t)src0->ne[2],(uint32_t)src0->ne[3], (uint32_t)src0->nb[0] / src0_type_size, (uint32_t)src0->nb[1] / src0_type_size, (uint32_t)src0->nb[2] / src0_type_size, (uint32_t)src0->nb[3] / src0_type_size,
10204-
(uint32_t)src1->ne[0], (uint32_t)src1->ne[1], (uint32_t)src1->ne[2],(uint32_t)src1->ne[3], (uint32_t)src1->nb[0] / src1_type_size, (uint32_t)src1->nb[1] / src1_type_size, (uint32_t)src1->nb[2] / src1_type_size, (uint32_t)src1->nb[3] / src1_type_size,
10205-
(uint32_t) dst->ne[0], (uint32_t) dst->ne[1], (uint32_t) dst->ne[2],(uint32_t) dst->ne[3], (uint32_t) dst->nb[0] / dst_type_size, (uint32_t) dst->nb[1] / dst_type_size, (uint32_t) dst->nb[2] / dst_type_size, (uint32_t) dst->nb[3] / dst_type_size,
10206-
0,
10207-
0.0f, (float) r2, (int32_t) r3
10208-
}, dryrun);
10209-
}
10210-
1021110176
static void ggml_vk_im2col(ggml_backend_vk_context * ctx, vk_context& subctx, const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst) {
1021210177
const int32_t s0 = dst->op_params[0];
1021310178
const int32_t s1 = dst->op_params[1];

0 commit comments

Comments
 (0)