pytorch/torch/csrc/jit/script
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
..
builtin_functions.cpp Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
builtin_functions.h Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
compiler.cpp Add bool type to IR (#11834) 2018-10-03 12:40:03 -07:00
compiler.h Introduce type variables to implement generic list operators (#12040) 2018-09-26 17:02:51 -07:00
error_report.h Allow __constant__ values in a ScriptModule to be used as attributes for builtin functions (#7017) 2018-04-27 17:44:17 -07:00
init.cpp Add bool type to IR (#11834) 2018-10-03 12:40:03 -07:00
init.h [jit] Have ScriptModule inherit from Module (#5769) 2018-03-22 00:17:49 -04:00
lexer.cpp Add reminder % to the jit 2018-09-12 12:40:38 -07:00
lexer.h Add reminder % to the jit 2018-09-12 12:40:38 -07:00
module.cpp Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
module.h Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
parser.h (Very small) allow trailing commas in assign or tuples (#11723) 2018-10-01 10:10:13 -07:00
python_tree_views.cpp Unified type annotation parsing for script frontends (#10279) 2018-08-14 18:13:15 -07:00
python_tree_views.h Add workaround to fix include warnings in Python 2 builds. (#6716) 2018-04-24 12:30:19 -07:00
tree_views.h Add reminder % to the jit 2018-09-12 12:40:38 -07:00
tree.h Match parameter names and = default (#9737) 2018-07-30 14:10:00 -07:00