fix different round behavior on CPU and GPU #16498 (#17443)
authorjwu <wujiqing9@gmail.com>
Thu, 7 Mar 2019 03:37:03 +0000 (19:37 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 7 Mar 2019 03:40:10 +0000 (19:40 -0800)
commit8ec7357312590d8ccb305d58690238536b009159
treefa3a95d561dd65fdd1e50c3b22860ed76d16f3b2
parent68c5c66800a81a6bbba8800407f9468c1860dc81
fix different round behavior on CPU and GPU #16498 (#17443)

Summary:
xxtemp, colesbury, bhushan23, zou3519,  convert gpu round behavior to half-to-even, consistent with torch cpu version and numpy. You feedback are welcomed.
See #16498
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17443

Differential Revision: D14261786

Pulled By: VitalyFedyunin

fbshipit-source-id: 98156436b545d72769831a89e2775d43ad913ebc
aten/src/ATen/cpu/vec256/vec256_base.h
aten/src/TH/generic/THTensorMoreMath.cpp
aten/src/TH/generic/THVectorDefault.cpp
aten/src/THC/THCNumerics.cuh
test/test_cuda.py