Emit math functions specific to output type (#18815)
authorJames Reed <jamesreed@fb.com>
Sun, 7 Apr 2019 00:44:53 +0000 (17:44 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 7 Apr 2019 00:56:05 +0000 (17:56 -0700)
commit34382e428fb94ae121dde78ae6a07e1814e75525
treea22ccbe810eb61e3a2b48e238cf16b1d0fdb3fd9
parent8961ad8c5ba644cb8c3d33f7e9a9536c3528eee3
Emit math functions specific to output type (#18815)

Summary:
Stacked on https://github.com/pytorch/pytorch/pull/18811

This makes it so that we only emit the *f variants of math functions if the output value's type is FloatTensor, otherwise we call the double variants to prevent loss of precision. This fixes more numerical issues
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18815

Differential Revision: D14816965

Pulled By: jamesr66a

fbshipit-source-id: 464be644168875ede987142281fb2168f4041e81
test/test_jit.py
torch/csrc/jit/fuser/codegen.cpp
torch/csrc/jit/fuser/cpu/resource_strings.h