Commit Graph

382 Commits

Author SHA1 Message Date
Michael Suo
8fc349f7be fix some compiler warnings
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23816

Test Plan: Imported from OSS

Differential Revision: D16654126

Pulled By: suo

fbshipit-source-id: addf3d24df514a17a521f8584cd5e142c8a3aec4
2019-08-05 17:52:56 -07:00
Michael Suo
8e9fef61f4 Revert D15996322: Open up AliasAnalysisKind for any ops
Differential Revision:
D15996322

Original commit changeset: df27ed95397b

fbshipit-source-id: 3327a3b56d8d1ea2cf0ea998f39ef254c47d5f3f
2019-08-05 14:54:27 -07:00
Sebastian Messmer
3ad9dbf9d5 Open up AliasAnalysisKind for any ops (#23810)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23810

A previous diff removed the special casing for aten:: and prim:: ops in alias analysis and implements alias analysis purely
based on the AliasAnalysisKind. To be sure it doesn't break our existing code base, it added asserts that make sure that
our existing aten:: and prim:: ops set the correct AliasAnalysisKind.

However, we don't need that restriction for future ops. Since we are now certain all existing cases are set up correctly,
we can remove these assertions.
ghstack-source-id: 87733626

Differential Revision: D15996322

fbshipit-source-id: df27ed95397bbe58a76b6b2c2e9808fcfde35294
2019-08-05 13:18:12 -07:00
mal
692825db86 Tests for C++ custom autograd function API (#23628)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23628

More tests for autograd::Fuction based on python tests from test_autograd.py

Test Plan: Imported from OSS

Differential Revision: D16600992

fbshipit-source-id: 0cb8bfbcff315111dc4936e837ff859d0a1e251d
2019-08-02 11:37:17 -07:00
Bram Wasti
ff3dd72469 Add in-place check to AliasDb
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23210

Test Plan: Imported from OSS

Differential Revision: D16444529

Pulled By: bwasti

fbshipit-source-id: 83af54d423989a2a726158b521093660584ee9c2
2019-08-01 12:15:52 -07:00
mal
ec13f18390 Allow empty Variables to be saved for backwards (#23618)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23618

For example: `save_for_backward({Variable(), x, Variable()})` should be allowed, so that this is consistent with the python API behaviour.

Test Plan: Added a test similar to the python test `test_save_none_for_backward` from test_autograd.py.

Differential Revision: D16589402

fbshipit-source-id: 847544ad8fc10772954d8629ad5a62bfdc1a66c1
2019-07-31 19:51:35 -07:00
mal
3fa2df7c9a Support custom autograd functions in C++ (#23572)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23572

### **(The stack from #23020  was moved into this PR)**

Adding API for custom autograd operations, with user defined forward and backward, [like in python](https://pytorch.org/docs/stable/notes/extending.html#extending-torch-autograd).

The custom operation should be a subclass of Function, with static forward and backward functions. `forward()` can accept any arguments similar to the Python API and `backward()` should accept a variable list as an argument.

Both `forward()` and `backward() `accept a AutogradContext* which can be used to share data between them.
Variables can be saved in the context using `save_for_backward()` and other data can be saved in the map `save` in the form of `<std::string, at::IValue>` pairs. Variables saved in forward can be accessed with `get_saved_variables()`.

Example usage:
```
class MyFunction : public Function<MyFunction> {
  public:
  static variable_list forward(AutogradContext *ctx, int n, Variable var) {
     // Save data for backward in context
     ctx->saved_data["n"] = n;
     return {var};
  }

  static variable_list backward(AutogradContext *ctx, variable_list grad_output) {
     // Use data saved in forward
     auto n = ctx->saved_data["n"].toInt();
     return {grad_output[0]*n};
  }
};

```
Then, it can be used with:
```
Variable x;
MyFunction::apply(6, x);
```

Also AutogradContext has methods to mark outputs as non differentiable and mark inputs as dirty similar to the [Python API](ff23a02ac4/torch/autograd/function.py (L26)).

Test Plan: Added tests for the custom autograd function API based on test_autograd.py. Currently only the tests for the basic functionality have been added. More tests will be added later.

Differential Revision: D16583428

fbshipit-source-id: 0bd42f19ce37bcd99d3080d16195ad74d40d0413
2019-07-31 11:30:48 -07:00
Nikolay Korovaiko
9dea86f86b Make ProfiledTensorType hashable
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23116

Differential Revision: D16519748

Pulled By: Krovatkin

fbshipit-source-id: 25090678d82d5dc9ca0a48aef45eeb62b8ac8d45
2019-07-30 13:11:06 -07:00
xzhu1900
31f1928096 add sorting policy to ChunkDataset (#23053)
Summary:
Add a sorting policy to ChunkDataset.

This is considered an advanced parameter for developers who want to apply a 'sorting policy' to the chunk data before sampling into minibatch.

Different than the collate method, this policy is applied on the chunk level instead of minibatch level. When a chunk of data is loaded (multiple chunks if cross_chunk_shuffle_count_ is greater than 1), this policy is targeting to the full loaded data. It will be useful if developers want to perform some pre-processing (like bucketing) to the chunk data before example sampler samples the data.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23053

Differential Revision: D16537692

Pulled By: colesbury

fbshipit-source-id: cd21ed40ab787a18b8c6dd304e5b806a7a45e6ba
2019-07-29 12:34:02 -07:00
Shen Li
aae48748f2 Avoid unnecessary tensor clone in Cloneable (#20995)
Summary:
As pointed out by SsnL in https://github.com/pytorch/pytorch/issues/20910, when clone destination is different from the module's device,
`Cloneable` currently calls `clone()` and then `to()` on every parameter and buffer, where the first clone is unnecessary.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20995

Differential Revision: D15517353

Pulled By: mrshenli

fbshipit-source-id: 6b6dc01560540a63845663f863dea0a948021fa5
2019-07-26 12:46:42 -07:00
Sebastian Messmer
bbc53bffef AliasAnalysisKind::CONSERVATIVE/FROM_SCHEMA (#22175)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22175

- Rename AliasAnalysisKind::DEFAULT to AliasAnalysisKind::CONSERVATIVE
- Introduce AliasAnalysisKind::FROM_SCHEMA that means the alias annotations of the schema should be honored
- Introduce AliasAnalysisKind::INTERNAL_SPECIAL_CASE to be able to run assertions that internal special cased ops are treated correctly

- aten:: and prim:: ops are not treated as special cases anymore, but just use AliasAnalysisKind::FROM_SCHEMA
- There's a set of assertions to ensure that aten:: and prim:: ops are all correctly set up to use AliasAnalysisKind::FROM_SCHEMA. Once this PR lands and passes all tests, we will remove those assertions and open up for the possibility of different AliasAnalysisKind settings for aten:: and prim:: ops

Differential Revision: D15929595

fbshipit-source-id: 7c6a9d4d29e13b8c9a856062cd6fb3f8a46a2e0d
2019-07-25 11:53:51 -07:00
jjsjann123
252710262f (#22775)
Summary:
passing FusionCallback and Symbol to recursive GraphFuser calls. It ensures
consistent fusion in nested Blocks.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22775

Differential Revision: D16439979

Pulled By: soumith

fbshipit-source-id: 18d4b13f52b03708b8580c73f75450adbb672ac1
2019-07-25 05:54:03 -07:00
davidriazati
2915d53096 Move OptionalType wrapping out of constants.cpp
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23234

Pulled By: driazati

Differential Revision: D16460880

fbshipit-source-id: d4e6b747615dbfe73a92ce571d3b2aaae7179f1b
2019-07-24 14:35:26 -07:00
Will Feng
8a77098247 Make Module::register_module / register_parameter / register_buffer public (#23196)
Summary:
In Python, `register_module` / `register_parameter` / `register_buffer` method in `nn.Module` is public. This PR makes those APIs public for C++ `nn::Module` as well. Closes https://github.com/pytorch/pytorch/issues/23140.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23196

Differential Revision: D16440239

Pulled By: yf225

fbshipit-source-id: e0eff6e1db592961fba891ec417dc74fa765e968
2019-07-23 21:18:41 -07:00
Michael Suo
2a37740a86 make RHS of assignment optional
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23033

Test Plan: Imported from OSS

Differential Revision: D16383330

Pulled By: suo

fbshipit-source-id: 63c55fae06f0cd534eb5053f91a773431ad052d4
2019-07-23 12:21:19 -07:00
Michael Suo
3be0a2b4be Parse all stmts in class defs
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23031

Test Plan: Imported from OSS

Differential Revision: D16383327

Pulled By: suo

fbshipit-source-id: 6485109a66e653b7f26d30b91a97af8d71594e22
2019-07-23 12:21:15 -07:00
Thomas Viehmann
0dabaad819 Add Module::replace_module to C++ api (#22546)
Summary:
This adds a replace_module method to the C++ api. This is needed to be able to replace modules.

The primary use case I am aware of is to enable finetuning of models.
Given that finetuning is fairly popular these days, I think it would be good to facilitate this in the C++ api as well.

This has been reported by Jean-Christophe Lombardo on the [forums](https://discuss.pytorch.org/t/finetuning-a-model-on-multiple-gpu-in-c/49195).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22546

Differential Revision: D16440289

Pulled By: yf225

fbshipit-source-id: c136f914b8fc5c0f1975d877ea817fda5c851cda
2019-07-23 11:50:06 -07:00
Sebastian Messmer
2073cc73f8 Use concrete types in jit test for generic lists (#23192)
Summary:
Creating an untyped generic list is deprecated, we always want type information to be present.

This fixes test cases and removes one that used lists with ambigious types.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/23192
ghstack-source-id: 86972891

Differential Revision: D16431482

fbshipit-source-id: 4ca5cd142118a3f0a4dcb8cd77383127c54abb29
2019-07-23 10:04:12 -07:00
Edward Yang
21f52ce0d4 Remove trailing semicolon from TORCH_CHECK macros.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22339

Test Plan: Imported from OSS

Differential Revision: D16182743

Pulled By: ezyang

fbshipit-source-id: 3c4ac0abe49ce83901bd5b07279a135857035f80
2019-07-23 09:58:50 -07:00
Pavel Belevich
965b97f5f0 Bidirectional GRU and LSTM C++ API forward fix (#22850)
Summary:
Fixing https://github.com/pytorch/pytorch/issues/17998
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22850

Differential Revision: D16420854

Pulled By: pbelevich

fbshipit-source-id: 76f38be40d8479fb9cafba92939cea61d81fd336
2019-07-22 12:59:47 -07:00
Michael Suo
eaee0c6cd9 Make classtypes hold a weak_ptr to their CU
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22902

Test Plan: Imported from OSS

Differential Revision: D16278159

Pulled By: suo

fbshipit-source-id: 6aa682e347847e808b44218d38ff1dae66945a07
2019-07-16 12:04:20 -07:00
Will Feng
a326aad816 Revert D16197608: [jit] Make classtypes hold a weak_ptr to their CU
Differential Revision:
D16197608

Original commit changeset: 22250d6f0d24

fbshipit-source-id: 47a8cdeb62b1033252070ecb92906358014b551a
2019-07-15 19:49:41 -07:00
Michael Suo
260b0e8476 Make classtypes hold a weak_ptr to their CU
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22726

Differential Revision: D16197608

Test Plan: Imported from OSS

Pulled By: suo

fbshipit-source-id: 22250d6f0d249f61f269afb4fe8e7d1af0be1205
2019-07-15 13:13:16 -07:00
Sebastian Messmer
800f4936f0 Deprecate untyped Lists (#22517)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22517

Force anybody creating an untyped Dict to call c10::impl::deprecatedUntypedDict().
This should hopefully make it clear that this is not public API and prevent people from using it.

Reviewed By: dzhulgakov

Differential Revision: D16115214

fbshipit-source-id: 2c8d0e4e375339c699d583995f79c05c59693c3e
2019-07-15 11:33:35 -07:00
Michael Suo
ec1b669d23 fix dce over loops
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22632

Test Plan: Imported from OSS

Differential Revision: D16184469

Pulled By: suo

fbshipit-source-id: b7cc2d20a7dd8b287e1b6128ddb70d3936032a7e
2019-07-10 12:03:19 -07:00
davidriazati
8a233b99cb Report errors through call stack (#22280)
Summary:
The error for `test_error_stack_module`:

```
Traceback (most recent call last):
  File "../test.py", line 35, in <module>
    scripted = torch.jit.script(M())
  File "/home/davidriazati/other/pytorch/torch/jit/__init__.py", line 1119, in script
    return _convert_to_script_module(obj)
  File "/home/davidriazati/other/pytorch/torch/jit/__init__.py", line 1825, in _convert_to_script_module
    raise e
RuntimeError:

d(int x) -> int:
Expected a value of type 'int' for argument 'x' but instead found type 'str'.
:
at ../test.py:11:12
def c(x):
    return d("hello") + d(x)
           ~ <--- HERE

'c' is being compiled since it was called from 'b'
at ../test.py:14:12
def b(x):
    return c(x)
           ~~~ <--- HERE

'b' is being compiled since it was called from 'forward'
at ../test.py:22:16
    def forward(self, x):
        return b(x)
               ~~~ <--- HERE

'forward' is being compiled since it was called from 'forward'
at ../test.py:31:20
    def forward(self, x):
        return x + self.submodule(x)
                   ~~~~~~~~~~~~~~~~ <--- HERE
```

This also unifies our error reporting in the front end with `ErrorReport`

TODO
* Include module names in message, #22207 should make this easy

](https://our.intern.facebook.com/intern/diff/16060781/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22280

Pulled By: driazati

Differential Revision: D16060781

fbshipit-source-id: c42968b53aaddb774ac69d5abbf7e60c23df8eed
2019-07-09 16:41:22 -07:00
Pavel Belevich
a48cf8f52d Fixed RNNImplBase reset and flat_weights methods to handle bidirectional flag correctly (#22493)
Summary:
Fixing https://github.com/pytorch/pytorch/issues/19545:
Changed torch/csrc/api/src/nn/modules/rnn.cpp to be consistent with torch/nn/modules/rnn.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22493

Differential Revision: D16111433

Pulled By: pbelevich

fbshipit-source-id: edfa41e8a9889d64918998dc7c46b8763fdf5765
2019-07-08 10:34:04 -07:00
Elias Ellison
577042a3cc Better Constant Propagation through Tuples (#22561)
Summary:
Replaces https://github.com/pytorch/pytorch/pull/21501 because ghimport had errors when i tried to import the stack that i couldn't figure out :'(

has the two commits that were previously accepted and the merge commit
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22561

Differential Revision: D16135743

Pulled By: eellison

fbshipit-source-id: f0a98842ccb334c7ceab04d1437e09dc76be0eb1
2019-07-05 18:06:46 -07:00
Michael Suo
4b9b7d6f03 improvements to QualifiedName (#22204)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22204
ghimport-source-id: 319afc622f7137ca9075efefca1a05acedc19a4a

Test Plan: Imported from OSS

Differential Revision: D15998759

Pulled By: suo

fbshipit-source-id: 4534443aef61255af0fa3d2ed1be5e87266e2f2c
2019-07-04 17:12:08 -07:00
Michael Suo
3b2844eeea Make CompilationUnit own Functions (#22202)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22202
ghimport-source-id: de6c963af1df76d2d6357155e64a5913ab879f76

Test Plan: Imported from OSS

Differential Revision: D15998761

Pulled By: suo

fbshipit-source-id: 5414a6424953738d823b265d20dc67dde6e5b2d8
2019-07-04 17:12:00 -07:00
Wanchao Liang
799633e4cd move casting ops from prim to aten
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22275

Test Plan: Imported from OSS

Differential Revision: D16060597

Pulled By: wanchaol

fbshipit-source-id: a11d8ad3b037e15bd670cc7cd3fefd4f0abd0bba
2019-07-03 22:22:28 -07:00
Sebastian Messmer
e68dc899d1 Fix compiler warnings (#22162)
Summary:
Fix various compiler warnings
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22162

Differential Revision: D16085339

Pulled By: smessmer

fbshipit-source-id: d36a4b334315f1a5942cac46443a7d166ca36d0d
2019-07-02 14:12:55 -07:00
Sebastian Messmer
6d5871300b Use concrete types on call sites for Dict/List (#22004)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22004

In future, we want all dicts/lists to store information about the types they contain.
This is only possible if the creation API doesn't allow creating lists/dicts without type information.
This diff removes some call sites that don't specify type information and have it specify type information.

Reviewed By: dzhulgakov

Differential Revision: D15906387

fbshipit-source-id: 64766a2534b52c221e8a5501a85eaad13812e7bd
2019-07-02 11:52:35 -07:00
xzhu1900
f0f2331a1c Add support for cross-chunk shuffling in ChunkDataset (#22347)
Summary:
This change adds one advanced support for cross-chunk shuffling.

For training with static dataset, the default configuration is at user's disposal. However, in some user cases, over each epoch, new data is added to the current dataset, thus the dataset's size is dynamically changing/increasing. In order to mix the new data and the old data for better random sampling, one approach is to shuffle examples from more than 1 chunks. This feature is supported with this change. By specifying the `cross_chunk_shuffle_count_` on construction, advanced user can specify how many chunks to shuffle example from.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22347

Differential Revision: D16081378

Pulled By: zhangguanheng66

fbshipit-source-id: fd001dfb9e66947839adecfb9893156fbbce80d0
2019-07-01 19:13:34 -07:00
Roy Li
6c454ff14c Stop using Type in Python bindings (#21963)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21963
ghimport-source-id: 4d9d66ba2c8587503d892b67f535cc2a62e2d19e

Test Plan: Imported from OSS

Differential Revision: D15897423

Pulled By: li-roy

fbshipit-source-id: 2dd55ceb80971df7c86545b7bfff733387f13572
2019-06-30 04:11:32 -07:00
xzhu1900
f39b6624ba ChunkDataset checkpoint support (#21889)
Summary:
When dealing with large scale dataset, it is handy if we can save the dataset status and resume later. Especially in cases where some unexpected crash happens, user don't need to start over the whole dataset from begining. Instead, they can reload it from the last checkpoint.

This change adds support for checkpoint save/load logic in ChunkDataset.

On ChunkDataset construction, user can specify a file name from which to load the checkpoint. If it is empty, default to start from fresh; otherwise the ChunkDataset will 'fast forward' the chunk sampler to the corresponding checkpoint.

The user can also call ChunkDataset::save() to serialize current status to a file, which can be used later.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21889

Differential Revision: D16024582

Pulled By: ailzhang

fbshipit-source-id: 1862ab5116f94c9d29da174ce04a91041d06cad5
2019-06-26 22:54:14 -07:00
Sebastian Messmer
de85abf226 Allow default construction of Dict/List (#22084)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22084

For DictPtr/ListPtr, default construction was disallowed because it was ambigious if it's supposed to create an empty list or a nullptr.
But since we renamed them to Dict/List, we can now allow default construction without ambiguity.

Differential Revision: D15948098

fbshipit-source-id: 942a9235b51608d1870ee4a2f2f0a5d0d45ec6e6
2019-06-25 17:40:48 -07:00
Zachary DeVito
5b87049c66 remove uses of std::shared_ptr<Module> (#21934)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21934
ghimport-source-id: e64ab9096f43749ead3ac5567675b815da295664

Test Plan: Imported from OSS

Differential Revision: D15892401

Pulled By: zdevito

fbshipit-source-id: 6424139206593ff944556c69d8a54723884eacaf
2019-06-25 13:24:38 -07:00
Nikolay Korovaiko
a256b09ce9 Backout Liveness Tests again :-(
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22100

Differential Revision: D15956214

Pulled By: Krovatkin

fbshipit-source-id: 9b0c8ecf5b479bf878ffc31acc416bd8dbfe4b50
2019-06-22 00:18:21 -07:00
James Reed
f7b2778cb1 s/uniqueName/debugName/ (#22096)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22096
ghimport-source-id: 8f1d994b98432942b5beeb10bf6d30e447d51997

Test Plan: Imported from OSS

Differential Revision: D15956004

Pulled By: jamesr66a

fbshipit-source-id: 319d2d20ef0863249a8a2bdd228b4f792d37bfab
2019-06-21 20:54:53 -07:00
Ailing Zhang
856268c716 Revert D15947873: [JIT] s/uniqueName/debugName
Differential Revision:
D15947873

Original commit changeset: 31a2b30d0ce9

fbshipit-source-id: ef1c0f120c1835184d8106d176cea58ec6ad40b7
2019-06-21 18:51:03 -07:00
James Reed
36e4b54420 s/uniqueName/debugName (#22048)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22048
ghimport-source-id: a82d80ceec1d8055ce4cf62df10ade4a224109f8

Test Plan: Imported from OSS

Differential Revision: D15947873

Pulled By: jamesr66a

fbshipit-source-id: 31a2b30d0ce911edf5791ca10040a1e968750b06
2019-06-21 17:59:38 -07:00
Nikolay Korovaiko
f164c01f9c Adding liveness test cases back
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/21762

Differential Revision: D15943509

Pulled By: Krovatkin

fbshipit-source-id: 4b65bf63ab15a2347da5f7269cc0f2dbb226b330
2019-06-21 15:09:09 -07:00
Nikolay Korovaiko
a3fc6ed046 Hook up liveness into profiling pipeline.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/21881

Differential Revision: D15931627

Pulled By: Krovatkin

fbshipit-source-id: dc825a563c7aceb5f66a2ed2a600d550b70941b2
2019-06-20 21:23:16 -07:00
Sebastian Messmer
275087383b ListPtr->List DictPtr->Dict step 2 (#21937)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21937

This changes call sites to use the new naming scheme

Reviewed By: zdevito

Differential Revision: D15892404

fbshipit-source-id: 8d32aa90a0ead1066688166478f299fde9c2c133
2019-06-19 18:02:05 -07:00
James Reed
dd046bef8d NamedTuple serialization (#21839)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21839
ghimport-source-id: b9d82018fbf26b22d58cad3a033cbfe4e879a8fe

Test Plan: Imported from OSS

Reviewed By: zdevito

Differential Revision: D15860002

Pulled By: jamesr66a

fbshipit-source-id: 0fc97c4adefa9ae4937f21179c7afa817f4099e5
2019-06-19 10:43:55 -07:00
Michael Suo
4f75da3b41 change ClassType::compilation_unit to return owning ptr (#21787)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21787
ghimport-source-id: eed7b98b0f02745066164b8ef3906291931e2ecb

Test Plan: Imported from OSS

Differential Revision: D15831353

Pulled By: suo

fbshipit-source-id: 50695c35dba8ffea710cbc9aca8aba6a75512fa0
2019-06-16 02:37:07 -07:00
peter
794ee6d00c Switch to out-source builds for LibTorch
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/21772

Differential Revision: D15839332

Pulled By: yf225

fbshipit-source-id: 017cf61c5682c6a8ffeaf2ca952e1418c27be30e
2019-06-14 21:00:18 -07:00
davidriazati
220efdbdc4 Refactor pybind_utils.h (#21550)
Summary:
This refactors pybind_utils so we can have all our type-inferring stuff in
1 place (e.g. for #21379)

There is some follow up work to make the error messages better, but I think that's fine to save for another PR.
](https://our.intern.facebook.com/intern/diff/15727002/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21550

Pulled By: driazati

Differential Revision: D15727002

fbshipit-source-id: a6974f2e1e5879f0503a18efc138da31cda7afa2
2019-06-14 17:27:45 -07:00
Nikolay Korovaiko
a85305fdea Hook up profiled execution in the interpreter (#21799)
Summary:
Rebasing https://github.com/pytorch/pytorch/pull/21616 onto master
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21799

Differential Revision: D15832854

Pulled By: Krovatkin

fbshipit-source-id: 88d754446df2abc25ea86e46764848d48ee3a5fc
2019-06-14 16:56:13 -07:00