Avoid false-positive dependent name lookup error by not depending on auto keyword (#12483)

* Workaround false positive error produced by clang

ROCm's hip clang complaints that "use 'template' keyword to treat 'Foo' as a dependent template name"
where Foo is not a dependent template name. Instead, avoid the using of auto keyword fixes the error
here.
This commit is contained in:
cloudhan 2022-08-08 10:32:01 +08:00 committed by GitHub
parent eb90b52a75
commit ddea1e48df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ Status RoiAlign<T>::ComputeInternal(OpKernelContext* context) const {
return status;
}
auto& Y = *context->Output(0, {num_rois, x_dims[1], this->output_height_, this->output_width_});
Tensor& Y = *context->Output(0, {num_rois, x_dims[1], this->output_height_, this->output_width_});
int64_t output_size = Y.Shape().Size();
if (output_size > 0) {

View file

@ -155,8 +155,8 @@ Status Upsample<T>::ComputeInternal(OpKernelContext* context) const {
return BaseCompute(context, roi, scales_, output_dims);
}
const auto* scales = context->Input<Tensor>(scales_input_idx_);
const auto* sizes = context->Input<Tensor>(sizes_input_idx_);
const Tensor* scales = context->Input<Tensor>(scales_input_idx_);
const Tensor* sizes = context->Input<Tensor>(sizes_input_idx_);
if (scales_cached_) {
ORT_ENFORCE(sizes == nullptr, "Only one of scales or sizes must be provided as input.");