@@ -513,8 +513,8 @@ static size_t vk_skip_checks;
513
513
static size_t vk_output_tensor;
514
514
515
515
static void ggml_vk_print_tensor(ggml_backend * ctx, const ggml_tensor * tensor, const char * name);
516
- static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_compute_params * params, ggml_tensor * tensor);
517
- static void ggml_vk_check_results_1(ggml_backend_vk_context * ctx, ggml_compute_params * params, ggml_tensor * tensor);
516
+ static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_tensor * tensor);
517
+ static void ggml_vk_check_results_1(ggml_backend_vk_context * ctx, ggml_tensor * tensor);
518
518
#endif
519
519
520
520
typedef void (*ggml_vk_func_t)(ggml_backend_vk_context * ctx, vk_context * subctx, const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst);
@@ -5644,7 +5644,7 @@ static void ggml_vk_build_graph(ggml_backend_vk_context * ctx, ggml_tensor * nod
5644
5644
}
5645
5645
}
5646
5646
5647
- static bool ggml_vk_compute_forward(ggml_backend_vk_context * ctx, ggml_compute_params * params, ggml_tensor * tensor){
5647
+ static bool ggml_vk_compute_forward(ggml_backend_vk_context * ctx, ggml_tensor * tensor){
5648
5648
ggml_tensor_extra_gpu * extra = nullptr;
5649
5649
5650
5650
switch (tensor->op) {
@@ -5697,17 +5697,10 @@ static bool ggml_vk_compute_forward(ggml_backend_vk_context * ctx, ggml_compute_
5697
5697
return false;
5698
5698
}
5699
5699
5700
- if (params->ith != 0) {
5701
- return true;
5702
- }
5703
- if (params->type == GGML_TASK_TYPE_INIT || params->type == GGML_TASK_TYPE_FINALIZE) {
5704
- return true;
5705
- }
5706
-
5707
5700
VK_LOG_DEBUG("ggml_vk_compute_forward(" << tensor << ", name=" << tensor->name << ", op=" << ggml_op_name(tensor->op) << ", type=" << tensor->type << ", ne0=" << tensor->ne[0] << ", ne1=" << tensor->ne[1] << ", ne2=" << tensor->ne[2] << ", ne3=" << tensor->ne[3] << ", nb0=" << tensor->nb[0] << ", nb1=" << tensor->nb[1] << ", nb2=" << tensor->nb[2] << ", nb3=" << tensor->nb[3] << ", view_src=" << tensor->view_src << ", view_offs=" << tensor->view_offs << ")");
5708
5701
5709
5702
#ifdef GGML_VULKAN_CHECK_RESULTS
5710
- ggml_vk_check_results_0(ctx, params, tensor);
5703
+ ggml_vk_check_results_0(ctx, tensor);
5711
5704
#endif
5712
5705
5713
5706
vk_context& subctx = ctx->gc.contexts[extra->ctx_idx];
@@ -6214,23 +6207,20 @@ GGML_CALL static ggml_status ggml_backend_vk_graph_compute(ggml_backend_t backen
6214
6207
ggml_vk_build_graph(ctx,cgraph->nodes[i], i == last_node);
6215
6208
}
6216
6209
6217
- ggml_compute_params params = {};
6218
- params.type = GGML_TASK_TYPE_COMPUTE;
6219
- params.ith = 0;
6220
6210
for (int i = 0; i < cgraph->n_nodes; i++) {
6221
6211
ggml_tensor * node = cgraph->nodes[i];
6222
6212
6223
6213
if (ggml_vk_is_empty(node)) {
6224
6214
continue;
6225
6215
}
6226
6216
6227
- bool ok = ggml_vk_compute_forward(ctx, ¶ms, node);
6217
+ bool ok = ggml_vk_compute_forward(ctx, node);
6228
6218
if (!ok) {
6229
6219
fprintf(stderr, "%s: error: op not supported %s (%s)\n", __func__, node->name, ggml_op_name(node->op));
6230
6220
}
6231
6221
#ifdef GGML_VULKAN_CHECK_RESULTS
6232
6222
else {
6233
- ggml_vk_check_results_1(ctx, ¶ms, node);
6223
+ ggml_vk_check_results_1(ctx, node);
6234
6224
}
6235
6225
#endif
6236
6226
GGML_ASSERT(ok);
@@ -6600,11 +6590,8 @@ void * comp_result;
6600
6590
size_t comp_size;
6601
6591
size_t comp_nb[GGML_MAX_DIMS];
6602
6592
size_t check_counter = 0;
6603
- static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_compute_params * params, ggml_tensor * tensor) {
6604
- if (params->ith != 0) {
6605
- return;
6606
- }
6607
- if (params->type == GGML_TASK_TYPE_INIT || params->type == GGML_TASK_TYPE_FINALIZE || tensor->op == GGML_OP_TRANSPOSE) {
6593
+ static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_tensor * tensor) {
6594
+ if (tensor->op == GGML_OP_TRANSPOSE) {
6608
6595
return;
6609
6596
}
6610
6597
@@ -6908,11 +6895,8 @@ static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_compute_
6908
6895
ggml_free(ggml_ctx);
6909
6896
}
6910
6897
6911
- static void ggml_vk_check_results_1(ggml_backend_vk_context * ctx, ggml_compute_params * params, ggml_tensor * tensor) {
6912
- if (params->ith != 0) {
6913
- return;
6914
- }
6915
- if (params->type == GGML_TASK_TYPE_INIT || params->type == GGML_TASK_TYPE_FINALIZE || tensor->op == GGML_OP_TRANSPOSE) {
6898
+ static void ggml_vk_check_results_1(ggml_backend_vk_context * ctx, ggml_tensor * tensor) {
6899
+ if (tensor->op == GGML_OP_TRANSPOSE) {
6916
6900
return;
6917
6901
}
6918
6902
if (!(vk_output_tensor > 0 && vk_output_tensor == check_counter) && check_counter <= vk_skip_checks) {
0 commit comments