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

Optimizations when alpha or beta is 0 #110

Closed
maleadt opened this issue Jun 27, 2023 · 2 comments · Fixed by #120
Closed

Optimizations when alpha or beta is 0 #110

maleadt opened this issue Jun 27, 2023 · 2 comments · Fixed by #120

Comments

@maleadt
Copy link
Member

maleadt commented Jun 27, 2023

mul! is commonly invoked with beta = 0, which means we shouldn't load from C unconditionally.

@thomasfaingnaert
Copy link
Member

thomasfaingnaert commented Jun 27, 2023

To handle that case, we probably can just add a ZeroLayout{T} that always returns a 0, and pass that as C layout to the Config if beta == 0.

@maleadt
Copy link
Member Author

maleadt commented Jun 27, 2023

Works beautifully. I'll make that part of a BLAS rework PR I'll create some time this week.

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 a pull request may close this issue.

2 participants