-
Notifications
You must be signed in to change notification settings - Fork 35
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
rewrite the TF lite binary conv. op #88
Conversation
What was the speed difference that you got? 😄 |
@pytest.mark.parametrize("kernel_size", [3, 5]) | ||
@pytest.mark.parametrize("strides", [[1, 1], [2, 2]]) | ||
@pytest.mark.parametrize("padding", ["VALID", "SAME"]) | ||
def test_bconv2d_op_inference( |
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.
Nice new testing setup!
Once our zero-padding-correction-functor supports dilations, we should also add that here.
PaddingFunctor padding_functor; | ||
padding_functor(params->batch, params->input_height, params->input_width, | ||
params->channels_in, filter->data.f, |
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 think the padding functor requires special care when there are dilations. Now that we partially support dilations (since we use TFlite's im2col) we should add a TODO here or in the padding functor itself, and open a GitHub issue.
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.
Looks great!
closes #73
In this PR, I separate the impl. path of bconv op in TF and TF lite. Now the TF lite bconv op uses the default memory layout of TF lite for filters and also(dilated)im2col functions and TF lite internal types (MatrixParams, ...). This simplifies the integrating the Op to RUY framework and might give us also some performance improvements.