Skip to content
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

vulkan: change an assertion #10328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FirstTimeEZ
Copy link
Contributor

@FirstTimeEZ FirstTimeEZ commented Nov 16, 2024

src1 can go down the first pipeline as nullptr
src0 and dst only need to be checked once

the only thing that needs to be asserted here is if the type is GGML_TYPE_F16 but read my comment about that.

src1 can go down the first pipeline as nullptr and src0 only needs to be checked once

this means the assertion is only required to check if the type is GGML_TYPE_F16 and can usually be skipped
Comment on lines +3936 to +3939
else {
GGML_ASSERT(src1->type == GGML_TYPE_F16);
return ctx->device->pipeline_soft_max_f32_f16;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else if (src1->type == GGML_TYPE_F16) {
    return ctx->device->pipeline_soft_max_f32_f16;
}

This could be else if with no assertion because it will return nullptr and fatal error anyway but maybe you want it to fail via the assertion.

@FirstTimeEZ
Copy link
Contributor Author

FirstTimeEZ commented Nov 16, 2024

Also gets rid of this, which is just caused by intellisense not being aware of the behavior of the assert macro (I think)

Screenshot 2024-11-16 201027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant