Skip to content

Commit 6faac9f

Browse files
committed
Revert "Update CUDA graph on scale change plus clear nodes/params (ggml-org#9550)"
This reverts commit 41f4778.
1 parent f377f88 commit 6faac9f

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

ggml/src/ggml-cuda.cu

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,6 @@ static void set_ggml_graph_node_properties(ggml_tensor * node, ggml_graph_node_p
24782478
for (int i = 0; i < GGML_MAX_SRC; i++) {
24792479
graph_node_properties->src_address[i] = node->src[i] ? node->src[i]->data : nullptr;
24802480
}
2481-
memcpy(graph_node_properties->op_params, node->op_params, GGML_MAX_OP_PARAMS);
24822481
}
24832482

24842483
static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
@@ -2510,12 +2509,6 @@ static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_gra
25102509
return false;
25112510
}
25122511
}
2513-
2514-
if (node->op == GGML_OP_SCALE &&
2515-
memcmp(graph_node_properties->op_params, node->op_params, GGML_MAX_OP_PARAMS) != 0) {
2516-
return false;
2517-
}
2518-
25192512
return true;
25202513
}
25212514

@@ -2727,9 +2720,7 @@ GGML_CALL static enum ggml_status ggml_backend_cuda_graph_compute(ggml_backend_t
27272720
// First call with null argument gets number of nodes in graph
27282721
CUDA_CHECK(cudaGraphGetNodes(cuda_ctx->cuda_graph->graph, nullptr, &cuda_ctx->cuda_graph->num_nodes));
27292722
// Subsequent call with non-null argument gets nodes
2730-
cuda_ctx->cuda_graph->nodes.clear();
27312723
cuda_ctx->cuda_graph->nodes.resize(cuda_ctx->cuda_graph->num_nodes);
2732-
cuda_ctx->cuda_graph->params.clear();
27332724
cuda_ctx->cuda_graph->params.resize(cuda_ctx->cuda_graph->num_nodes);
27342725
if (cuda_ctx->cuda_graph->num_nodes > 0) {
27352726
CUDA_CHECK(cudaGraphGetNodes(cuda_ctx->cuda_graph->graph, cuda_ctx->cuda_graph->nodes.data(), &cuda_ctx->cuda_graph->num_nodes));

ggml/src/ggml-cuda/common.cuh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ struct ggml_graph_node_properties {
569569
int64_t ne[GGML_MAX_DIMS];
570570
size_t nb[GGML_MAX_DIMS];
571571
void * src_address[GGML_MAX_SRC];
572-
int32_t op_params[GGML_MAX_OP_PARAMS / sizeof(int32_t)];
573572
};
574573

575574
struct ggml_cuda_graph {

0 commit comments

Comments
 (0)