pytorch/torch/csrc/jit/script
Michael Suo 7f35e92af2 mutable lists (#10700)
Summary:
This PR implements the design that we discussed. Changes:
- Added a World token IValue and type. The IValue is basically a dummy struct for now, in the future we may extend it (say, add thread-local state).
- Effectful ops explicitly declare they are mutable by having World tokens as inputs and outputs in their schema.
- Purely functional ops that use mutable values will get "fenced" and the world token will be threaded through the fences
- AnnotateEffects pass which wires up all the world tokens together.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10700

Reviewed By: eellison

Differential Revision: D9547881

Pulled By: michaelsuo

fbshipit-source-id: ebbd786c31f15bf45e2ddb0c188438ff2f5f3c88
2018-09-27 19:25:13 -07:00
..
compiler.cpp mutable lists (#10700) 2018-09-27 19:25:13 -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 Introduce type variables to implement generic list operators (#12040) 2018-09-26 17:02:51 -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 type variables to implement generic list operators (#12040) 2018-09-26 17:02:51 -07:00
module.h add autodiff expressions for common operations (#11832) 2018-09-26 08:10:04 -07:00
parser.h Implement elif in string frontend (#11667) 2018-09-14 10:09:46 -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