pytorch
1ac0285c - Fix possible out-of-range error of 'as_nd' util function (#82393)

Commit
2 years ago
Fix possible out-of-range error of 'as_nd' util function (#82393) ### Description Fix a flaw in util function `as_nd` which may cause out-of-range error if input is 1-dimensional. This util function is defined as local a lambda expression in `aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp: qprelu_out_kernel()` ### Solution Use `reshape` instead of the lambda expression. Check number of dims of input before assigning values. Pull Request resolved: https://github.com/pytorch/pytorch/pull/82393 Approved by: https://github.com/z-a-f, https://github.com/jerryzh168
Author
Committer
Parents
Loading