Skip to content

Commit

Permalink
Fix the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuslepukhin committed Jun 21, 2024
1 parent 0ed30db commit cdf0d62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/tensor/upsample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Status Upsample<T>::BaseCompute(OpKernelContext* context,
}

const bool is_2D = X_dims.size() == 2;
const bool is_nchw = is_2D ? true : scales[1] == 1.0f;
const bool is_nchw = is_2D ? true : (scales[0] == 1.0f && scales[1] == 1.0f);

ORT_RETURN_IF_NOT(is_nchw,
"Resize 'Cubic' mode only supports NCWH layout "
Expand Down

0 comments on commit cdf0d62

Please sign in to comment.