move half<->float conversions to oss operators (#17548)
authorHector Yuen <hyz@fb.com>
Thu, 7 Mar 2019 20:52:54 +0000 (12:52 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 7 Mar 2019 21:00:13 +0000 (13:00 -0800)
commit5bf9e419383c673b4b8a0b00076a1fca5208d30a
treee0429111b366687b38ad99a2ee63bf5fd2beabc0
parentaa4c4c47fa6fbc0630956d4b537ccfaabd75dd09
move half<->float conversions to oss operators (#17548)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17548

expose half float operators to OSS

common/math/Float16.h is the original implementation
this is substituted by caffe2/c10/util/Half.h

from the comments seems like the both implementations don't handle denormals

Reviewed By: jspark1105

Differential Revision: D14244200

fbshipit-source-id: f90ba28c5bf6a2b451b429cc4925b8cc376ac651
caffe2/operators/fused_rowwise_8bit_conversion_ops.cc
caffe2/operators/half_float_ops.cc
caffe2/operators/half_float_ops_test.cc [new file with mode: 0644]
caffe2/python/layers_test.py