-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Vulkan: Fix minor debug mode issues #14899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ggml/src/ggml-vulkan/ggml-vulkan.cpp
Outdated
@@ -11379,7 +11379,7 @@ static void ggml_vk_check_results_0(ggml_backend_vk_context * ctx, ggml_cgraph * | |||
tensor_clone = ggml_cpy(ggml_ctx, src_clone[0], src_clone[1]); | |||
} | |||
} else if (tensor->op == GGML_OP_SET_ROWS) { | |||
tensor_clone = ggml_set_rows(ggml_ctx, src_clone[0], src_clone[1]); | |||
tensor_clone = ggml_set_rows(ggml_ctx, src_clone[0], src_clone[1], src_clone[2]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the parameters should be here. Do we need to clone the dst tensor and pass that as the 'a' parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at it in detail, but this fixed the issue I had with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a weird operation because it doesn't keep around it's original 'a' parameter, and I think src_clone[2] will be null. And since it only writes sparsely to the destination we probably need to dup the original contents. So maybe something like:
tensor_clone = ggml_dup(ggml_ctx, dst->view_src);
tensor_clone = ggml_set_rows(ggml_ctx, tensor_clone, src_clone[0], src_clone[1]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked again, my code just fixed the compile problem, it does not work if actually used. But neither does yours, since the tensor data is still on GPU, so dup does not work. I think manually copying the view tensor to CPU and using it as view_src would work, but that would mean reworking the check_result functions to support this.
I just deactivated SET_ROWS for now to fix the issue, if we need set_rows checks they can be readded at a later point.
dbf7d78
to
573670b
Compare
No description provided.