onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

fused conv dimension fix

Open kiennguyen94 opened this issue 3 years ago • 1 comments

Description:

  • In Cuda EP, op FusedConv, when Y dimension is changed, also change the Z dimension to match.

Motivation and Context

  • Fixes CUDNN error in FusedConv when Z dimension does not match Y dimension. This can happen when Y dimension 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 Y dim is changed, try to match Z dim by:
    • Checking if z_dim is 1 less than y_dim and the last dimension of Y is 1; if true, add last y_dim[-1] to z_dim
    • Then check every dimension of Y and Z matches, return error before attempting CUDNN calls.

kiennguyen94 avatar Jul 28 '22 13:07 kiennguyen94

Thanks for your effort.

yuslepukhin avatar Jul 28 '22 17:07 yuslepukhin