You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update on "[ET-VK] Creating specialized version of conv2d pw shader for X and Y stride = 1 and padding = 0."
This diff creates a specialized version of the conv2d pw shader for X and Y stride equals 1 and padding equals 0.
* It adds a new file `conv2d_pw_s1p0.glsl`, which implements the conv2d pw shader for X and Y stride equals 1 and padding equals 0.
* It adds a new file `conv2d_pw_s1p0.yaml`, which defines the parameters and shader variants for the specialized conv2d pw shader.
* The file `Convolution.cpp` is modified to add a new parameter `stride_1_padding_0` to the `conv2d` function, which enables the use of the specialized shader.
Differential Revision: [D75423931](https://our.internmc.facebook.com/intern/diff/D75423931/)
[ghstack-poisoned]
Transposes are needed for operators transforming the input to a different rank, as 4D-tensors are assumed to be in NHWC-format, whereas all other are in NCHW format.
213
+
Transposes are needed for operators transforming the input to a different rank, as 4D and 5D-tensors are assumed to be in (N)NHWC-format, whereas all other are in (N)NCHW format.
182
214
This is relevant for the following cases:
183
-
- view: <4D -> 4D
184
-
- view: 4D -> <4D
185
-
Additionally, a 4D->4D view operation acting on the channel dimension currently needs to be performed in NCHW format, leadning to one extra input and output transpose for this case.
215
+
- view: <4D -> >=4D
216
+
- view: >=4D -> <4D
217
+
Additionally, a 4D/5D->4D/5D view operation acting on the channel dimension currently needs to be performed in (N)NCHW format, leadning to one extra input and output transpose for this case.
186
218
187
219
Transposes can be avoided for shapes where there is no difference in actual memory, e.g for
0 commit comments