pytorch/torch/jit
David Riazati d1ac1eba3b Add bool type to IR (#11834)
Summary:
This PR adds a bool type to `IValue` and puts it into place.

* changes conds for `prim::If` and `prim::Loop` to use `bool` type
* changes operators that take `bool`s to match their native ops
* fixes ambiguous `aten` ops `aten::std` and `aten::var`
	* fixes tests in `test_jit.py TestJitGenerated`
		```
		'test_std_dim',
		'test_std_dim_1d',
		'test_std_dim_1d_neg0',
		'test_std_dim_neg0',
		'test_var_dim',
		'test_var_dim_1d',
		'test_var_dim_1d_neg0',
		'test_var_dim_neg0'
		```
* adds `prim::BoolToTensor` and `prim::TensorToBool`

apaszke zdevito
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11834

Differential Revision: D9928570

Pulled By: driazati

fbshipit-source-id: 373c53df2f1a8ffa9e33d9a517002fbeef25f3eb
2018-10-03 12:40:03 -07:00
..
__init__.py Turns optimizations off when checking trace (#12172) 2018-09-28 19:40:10 -07:00
annotations.py Allow train/eval, and non-Tensor arguments to python functions (#11505) 2018-09-11 15:05:09 -07:00
batchop.py Add bool type to IR (#11834) 2018-10-03 12:40:03 -07:00
frontend.py Add reminder % to the jit 2018-09-12 12:40:38 -07:00
supported_ops.py Add initial documentation for JIT (#11357) 2018-09-07 14:27:47 -07:00