-
Notifications
You must be signed in to change notification settings - Fork 251
[CK_BUILDER] Forward convolution builder improvements #3179
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
…nstance-test-improvements
…nstance-test-improvements
…ila/ckb-remove-explicit-device-op-flag
…nstance-test-improvements
…ila/ckb-remove-explicit-device-op-flag
shumway
left a comment
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 like how this gets the large tensor information into the algorithm.
I'm not sure if base_algorithm is a good concept, but it seems to align well with our current design. We should merge this and then do a careful review of how users specify algorithms. I have a hunch that we can simplify this further, and having this concrete, working code is very helpful for reasoning about design and user experience.
Proposed changes
Improve the forward convolution builder implementation and addressed leftover feedback left from PR #3138. Main changes
static_assertin the default branch of switch as the static_assert was evaluated at compile time even for valid types. However, if we change thestatic_asserttothrow "<error message>", it will result in a compile-time error only if the default branch is actually hit. This assumes that the function isconsteval. Hence, changed all conversions in the convolution factory to use switch, which is more intuitive.