onnxruntime
onnxruntime copied to clipboard
fused conv dimension fix
Description:
- In Cuda EP, op
FusedConv, whenYdimension is changed, also change theZdimension to match.
Motivation and Context
- Fixes CUDNN error in
FusedConvwhenZdimension does not matchYdimension. This can happen whenYdimension is automatically changed. Eg Z is [1, 1024, 16] whereas Y is [1, 1024, 16, 1] - Fixes [11548](https://github.com/microsoft/onnxruntime/issues/12321), https://github.com/microsoft/onnxruntime/issues/11548, and https://github.com/microsoft/onnxruntime/issues/9194
- The fix is as follow:
- When
Ydim is changed, try to matchZdim by: - Checking if
z_dimis 1 less thany_dimand the last dimension ofYis 1; if true, add lasty_dim[-1]toz_dim - Then check every dimension of
YandZmatches, return error before attempting CUDNN calls.
- When
Thanks for your effort.