-
Notifications
You must be signed in to change notification settings - Fork 74k
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
tf.nn.depthwise_conv2d with rank=1 kernels (separable filters) #39050
Comments
/cc @jpienaar |
Is the proposal here that DepthwiseConv2dNative (for different dimensions) has an additional attribute to say that is separable and in which case it gets a rank 1 kernel. And allows backends to decide whether they want to implement that as a single call with 2D kernel or 2 calls of DepthwiseConv2dNative with said rank 1 kernel? The rationale being that matching these two calls would be too difficult/fragile? So it isn't a case where one would have %5 = tf.SomeKernelGeneration() and need to find cases where you have 1 dephtwise conv feeding into a next and they both share the same kernel, and if so one can convert to the other call form? |
I think that the framework can analyze if the kernel Is rank==1. |
Any news on this? We are adding a Gaussian filter again in Keras-cv: |
Hi @bhack, Are you looking similar feature tfa.image.gaussian_filter2d and tfio.experimental.filter.gaussian. Thank you! |
No, I meant these kind of optimizations could be handled by XLA/MLIR |
Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
nigthly
no
Describe the feature and the current behavior/state.
There is a thread about twice calling DepWhiseConv2d TF ops when we have rank=1 kernels (separable filters) VS a single call to DepWhiseConv2d with 2d kernel.
I suppose that is would be hard to fuse on trace two DepWhiseConv2d on the separable filter.
So I was asking why with the current DepWhiseConv2d in TF doesn't handle the kernel rank=1 case with an parameter for down the stack compiler/transformations (kernel size, input size, device type, etc.).
Will this change the current api? How?
Yes
Who will benefit with this feature?
Separable filters (gaussian blur, etc)
Any Other info.
See tensorflow/addons#1450 (comment) with follow-up @alextp and @rmlarsen comments.
The text was updated successfully, but these errors were encountered: