Skip to content

Make keepdims to its default value when adding ReduceMin/ReduceMax for quantization calibration#6788

Merged
yufenglee merged 2 commits intomasterfrom
calibration_reduce_minmax_operator
Feb 25, 2021
Merged

Make keepdims to its default value when adding ReduceMin/ReduceMax for quantization calibration#6788
yufenglee merged 2 commits intomasterfrom
calibration_reduce_minmax_operator

Conversation

@chilo-ms
Copy link
Copy Markdown
Contributor

Description:
Previously we set keepdims to 0 which could cause error when some input tensor is 0.
Change to keepdims's default value.

Motivation and Context

  • Why is this change required? What problem does it solve?
  • If it fixes an open issue, please link to the issue here.

@chilo-ms chilo-ms requested a review from yufenglee February 24, 2021 05:38
@chilo-ms chilo-ms requested a review from a team as a code owner February 24, 2021 05:38
@chilo-ms
Copy link
Copy Markdown
Contributor Author

Error message is like below:
"onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running ReduceMax node. Name:'427_ReduceMax' Status Message: /home/hcsuser/onnxruntime/onnxruntime/core/providers/cuda/reduction/reduction_ops.cc:372 onnxruntime::common::Status onnxruntime::cuda::PrepareForReduce(const onnxruntime::Tensor*, bool, const std::vector&, onnxruntime::cuda::PrepareReduceMetadata&, const onnxruntime::TensorShape*) keepdims || dim != 0 was false. Can't reduce on dim with value of 0 if 'keepdims' is false. Invalid output shape would be produced. input_shape:{0}"

@yufenglee
Copy link
Copy Markdown
Member

The CI fails. Could you please fix it?

@yufenglee yufenglee merged commit 9b3171e into master Feb 25, 2021
@yufenglee yufenglee deleted the calibration_reduce_minmax_operator branch February 25, 2021 17:48
oliviajain pushed a commit that referenced this pull request Feb 25, 2021
…r quantization calibration (#6788)

* Make keepdims to its default value when adding ReduceMin/ReduceMax

* Fix bug for adding ReduceMin/ReduceMax with keepdims=1
oliviajain added a commit that referenced this pull request Feb 25, 2021
Fix longformer parity and perf regression (#6760) …
Adding fp16 support for Einsum Cuda kernel (#6775) …
Update DirectML 1.4.1 to 1.4.2 for ORT 1.7 (#6780) …
Fix regression in constant folding optimizer (#6795)
Update transformers benchmark for transformers 4.3.* and ORT 1.7 (#6796) …
Make keepdims to its default value when adding ReduceMin/ReduceMax fo (#6788)… …
fix issues caused by quantize/calibrate changes (#6802)
6735 and 6728 already in release branch

Co-authored-by: Tianlei Wu <tlwu@microsoft.com>
Co-authored-by: Ye Wang <52801275+wangyems@users.noreply.github.com>
Co-authored-by: Ori Levari <orlevari@microsoft.com>
Co-authored-by: Hariharan Seshadri <shariharan91@gmail.com>
Co-authored-by: Chi Lo <54722500+chilo-ms@users.noreply.github.com>
Co-authored-by: stevenlix <38092805+stevenlix@users.noreply.github.com>
oliviajain added a commit that referenced this pull request Feb 26, 2021
…ceMax for quantization calibration (#6788)"

This reverts commit 9b3171e.
oliviajain added a commit that referenced this pull request Feb 27, 2021
…ceMax for quantization calibration (#6788)" (#6825)

This reverts commit 9b3171e.
pranav-prakash added a commit to ucb-bar/onnxruntime-riscv that referenced this pull request Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants