Jongsoo Park [Fri, 4 Jan 2019 05:37:03 +0000 (21:37 -0800)]
make conv_depthwise_dnnlowp_op_test faster (#15725)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15725
As title says.
Reviewed By: jianyuh
Differential Revision:
D13579188
fbshipit-source-id:
382072c95929ccf9e189e2338e35b046c4a0650f
Elad Zippory [Fri, 4 Jan 2019 05:36:49 +0000 (21:36 -0800)]
clarified language of doc for torch.mul (#15664)
Summary:
see issue #15636
Please note - I build the documents but the HTML is not updated with the edited content.
I did not also build the fork.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15664
Differential Revision:
D13571310
Pulled By: soumith
fbshipit-source-id:
d43be0f61705693d778cc12c13e86d6b06130ac7
Jongsoo Park [Fri, 4 Jan 2019 04:28:09 +0000 (20:28 -0800)]
disallow nbits_in_non_outlier == 0 in acc16 conv; option to fallback to acc32 (#15708)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15708
nbits_in_non_outlier == 0 doesn't make sense because it means everything is outlier and we can just use 32-bit accumulation.
Depending on architecture, break-even point between acc16 and acc32 can be different. Adding thresholds for falling back to acc32.
Reviewed By: jianyuh
Differential Revision:
D13574832
fbshipit-source-id:
b7a37aacbfdc7867e31838dafcdd5f7c2ac282af
Elias Ellison [Fri, 4 Jan 2019 01:31:56 +0000 (17:31 -0800)]
Torch tensor (#15224)
Summary:
Support torch.tensor in script. Already been accepted, trying to reland
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15224
Differential Revision:
D13466616
Pulled By: eellison
fbshipit-source-id:
f7850da07b0eb11af98f255fc15bd3cf861f2a40
Shen Li [Thu, 3 Jan 2019 23:12:13 +0000 (15:12 -0800)]
A quick fix for Stream operation errors on non-current device (#15689)
Summary:
see #15682
This is a quick fix by implementing the simpler solution as suggested by colesbury. As benchmark result shows, it slows down `Stream.query()` by ~20%, I would be happy to further pursue a more complex solution by implementing this in C++/ATen. But I would still vote for merge this quick fix first just to get rid of the bug sooner.
~Test TBA~ Added
FYI jeffreyksmithjr
now
```python
In [1]: def f():
...: d0 = torch.device('cuda:0')
...: d1 = torch.device('cuda:1')
...: with torch.cuda.device(d0):
...: s0 = torch.cuda.current_stream()
...: with torch.cuda.device(d1):
...: s1 = torch.cuda.current_stream()
...: s0.query()
...: s1.query()
In [4]: %timeit f()
38.1 µs ± 4.2 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
In [5]: %timeit f()
37.6 µs ± 2.7 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
before
```python
In [4]: %timeit f()
28.5 µs ± 1.74 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
In [5]: %timeit f()
35.3 µs ± 2.91 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15689
Differential Revision:
D13571697
Pulled By: mrshenli
fbshipit-source-id:
4fe697f91248c6419136d37bb5b7147e612e2f4c
David Riazati [Thu, 3 Jan 2019 22:31:09 +0000 (14:31 -0800)]
Break up generated tests (#13992)
Summary:
This PR breaks up `TestJitGenerated` into 3 classes. This makes for
easier testing of specific groups (e.g. run all generated functional
tests without having to wait for the autograd tests)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13992
Differential Revision:
D13076371
Pulled By: driazati
fbshipit-source-id:
1267af59be7d69feb690f5805fcd43fea58a7159
Michael Suo [Thu, 3 Jan 2019 21:50:42 +0000 (13:50 -0800)]
flake8 hook fix (#15693)
Summary:
This PR bypasses checking the user's configuration entirely and always use strict, since the CI considers it a hard failure if you can't pass flake8.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15693
Differential Revision:
D13574889
Pulled By: suo
fbshipit-source-id:
f5e1c5731cc49b6223b415317033c275bc7d4fec
Stuart Golodetz [Thu, 3 Jan 2019 21:37:50 +0000 (13:37 -0800)]
Prevent VS2017 from emitting ambiguous symbol errors (#15697)
Summary:
These `std::forward` calls cause VS2017 to emit:
error C2872: 'std': ambiguous symbol
This fix prevents the ambiguity by specifying that `::std` is intended.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15697
Differential Revision:
D13573483
Pulled By: goldsborough
fbshipit-source-id:
0439de3523a37a18df7af0cff4a1284a53833ddd
Zachary DeVito [Thu, 3 Jan 2019 20:14:17 +0000 (12:14 -0800)]
trace s_copy_ (#15690)
Summary:
s_copy_ was previously special-cased for out of place tracing.
This adds support for inplace tracing, which fixes tracing of
inception_v3
Fixes #15216
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15690
Differential Revision:
D13572011
Pulled By: zdevito
fbshipit-source-id:
1d565dec039a4b8c59179254285e61d2517ef9a9
Ailing Zhang [Thu, 3 Jan 2019 18:42:35 +0000 (10:42 -0800)]
Add mkldnn conv double backward (#15686)
Summary:
Fixes #15353 .
Like cudnn conv implementation, mkldnn also falls back to the default `_convolution_double_backward` as double backward.
This bug wasn't caught by CI before because mkldnn is only used when input scalar type is float, but our tests are all using double as default.
Adding test for float inputs, but mkldnn seems to have imprecision issues similar to cudnn implementation, so here I only check if double backward exists instead of calling `gradgradcheck`. Please correct me if the precision should actually be checked.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15686
Differential Revision:
D13571682
Pulled By: ailzhang
fbshipit-source-id:
f1762439762370f276cfd59e8b8b8a4dee960a4b
Spandan Tiwari [Thu, 3 Jan 2019 18:29:03 +0000 (10:29 -0800)]
Fix ONNX export of logical ops, including torch.ne, to have correct output datatype (#15677)
Summary:
This is the an updated version of the earlier PR https://github.com/pytorch/pytorch/pull/15185, since that one was closed.
Currently PyTorch ONNX exporter exports the logical ops (lt, gt, le, ge, eq, ne) with output type in corresponding ONNX ops as type tensor(uint8). But ONNX spec allows for only tensor(bool), which is why models that have these ops fail to load properly.
This issue is captured in #11339. Part of this issue, relating to the allowed input types, has been fixed in ONNX spec by houseroad. This PR fixes the other part pertaining to output type.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15677
Reviewed By: dzhulgakov
Differential Revision:
D13568450
Pulled By: houseroad
fbshipit-source-id:
a6afbea1afdb4edad8f8b1bc492f50b14e5f2fce
Shen Li [Thu, 3 Jan 2019 18:23:07 +0000 (10:23 -0800)]
Port legacy reflection_pad1d to ATen (#15480)
Summary:
1. Avoided using `THCDeviceTensor` by re-calculating the mapping from cuda (blockIdx, threadIdx) to input/output tensor index.
2. Changed Camelcase naming to underscore naming.
Profiling:
Legacy:
```bash
$py.test test/test_nn.py -k ReflectionPad1d -v -s
....
=========== 2 passed, 1258 deselected, 800 warnings in 4.35 seconds ============
```
Now:
```bash
$py.test test/test_nn.py -k ReflectionPad1d -v -s
...
=========== 2 passed, 1258 deselected, 800 warnings in 4.03 seconds ============
```
I have two questions about the code. Any insights are appreciated. gchanan zou3519
1. I can verify that [this magic](https://github.com/pytorch/pytorch/blob/master/aten/src/THCUNN/TemporalReflectionPadding.cu#L32-L36) correctly maps output index to input index in different cases. But, I have no idea about how did you come up with this algorithm that merges three categories (in left padding, in original input, in right padding) into a single statement?
2. Why do we need [get contiguous](https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/TemporalReflectionPadding.c#L80) tensors when calculating forward and backward propagation?
Reflection_pad2d porting will come in the next PR.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15480
Differential Revision:
D13544924
Pulled By: mrshenli
fbshipit-source-id:
182045434f210032a82cab721a190da0cd781fbf
Jongsoo Park [Thu, 3 Jan 2019 17:43:46 +0000 (09:43 -0800)]
bug fix in 3d group conv (#15625)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15625
3D group conv (both NCHW and NHWC layout) was not correct.
Added group=2 in test_1d_convolution and test_3d_convolution in conv_test
Reviewed By: protonu
Differential Revision:
D13562099
fbshipit-source-id:
586e8a7574a2764f2a3b559db6c2415b3ab90453
Gregory Chanan [Thu, 3 Jan 2019 17:16:16 +0000 (09:16 -0800)]
Port torch.arange to aten and parallelize on CPU.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15667
Differential Revision:
D13566631
Pulled By: gchanan
fbshipit-source-id:
e3243a4e81ecb58373681df8bf6a00428352fb14
Gerard Goossen [Thu, 3 Jan 2019 12:59:41 +0000 (04:59 -0800)]
Ignore flake8 warning about whitespace before ':' (#15663)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15663
Ignore sometimes incorrect flake8 warning about whitespace before ':'
See https://github.com/ambv/black/issues/315
Reviewed By: soumith
Differential Revision:
D13565818
fbshipit-source-id:
9d5ec2335899527ee71f4b505c00865a354e3bf0
Xiaomeng Yang [Thu, 3 Jan 2019 08:16:03 +0000 (00:16 -0800)]
Add count_include_pad arg for PoolOpGradient on CPU and fix ARM performance issue. (#15651)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15651
Add count_include_pad arg for PoolOpGradient on CPU and fix ARM performance issue.
Reviewed By: houseroad
Differential Revision:
D13564257
fbshipit-source-id:
3a143f1122bc507ccb7827e9b46908d5c7203735
Jianyu Huang [Thu, 3 Jan 2019 05:05:55 +0000 (21:05 -0800)]
Unify the usage of Dequantize (#15685)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15685
The declaration of "Dequantize" is in "fbsource/fbcode/deeplearning/fbgemm2/QuantUtils.h", so it requires the "namespace fbgemm".
<T> is actually optional, since the type can de deduced from the first argument.
In some places we have "Dequantize<T>(...)", while in other places we have "Dequantize(...)". We'd better unify them. As a reference, all occurrences of "Quantize" are using "fbgemm::Quantize<T>(...)".
Reviewed By: jspark1105
Differential Revision:
D13570847
fbshipit-source-id:
7fca9f7f9e4e0d9e5eb27ac44b8707adc3c80717
Shen Li [Thu, 3 Jan 2019 05:01:13 +0000 (21:01 -0800)]
Fix vec256 inversion (#15659)
Summary:
soumith zou3519
I was browsing the code, and think `vec256_int.h` might need a minor revision, but not 100% sure.
1. It currently invert the result by `XOR` with 0. Should it `XOR` with 1 instead?
~2. AVX2 logical operations would set all bits in a byte/word/... to `1` if the condition holds. So functions, such as `_mm256_cmpeq_epi64 ` would return `0/-1` instead of `0/1`. Should it be masked with `1` to make sure it returns 0/1?~
~Would I be correct if I assume that the code revised below is not yet activated, but will be after we port legacy code to ATen?~
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15659
Differential Revision:
D13565929
Pulled By: mrshenli
fbshipit-source-id:
8ae3daf256c3d915dd855a2215c95275e899ea8c
Zachary DeVito [Thu, 3 Jan 2019 04:07:55 +0000 (20:07 -0800)]
Add min/max on numbers to JIT
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15680
Differential Revision:
D13568806
Pulled By: zdevito
fbshipit-source-id:
ef0f33cc12a057184293bc31d28cc7b24f73eb94
Natalia Gimelshein [Thu, 3 Jan 2019 03:50:19 +0000 (19:50 -0800)]
initialize with ident value in global reduction (#15653)
Summary:
Fixes #15647. cc colesbury.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15653
Differential Revision:
D13571132
Pulled By: soumith
fbshipit-source-id:
8f25943c974b3b931f4528e0e0a370bc095dab51
svcscm [Thu, 3 Jan 2019 02:53:15 +0000 (18:53 -0800)]
Updating submodules
Reviewed By: yns88
fbshipit-source-id:
f7b540159cf1fe72825d09d55d56117d14ff90eb
rtarquini [Thu, 3 Jan 2019 02:48:31 +0000 (18:48 -0800)]
Support for Jetson Xavier (#15660)
Summary:
The request changes are to support building Pytorch 1.0 on the Jetson Xavier with Openblas. Jetson Xavier with Jetpack 3.3 has generic lapack installed. To pick up the CUDA accelerated BLAS/Lapack, I had to build Openblas and build/link pytorch from source. Otherwise, I got a runtime error indicating lapack routines were not cuda enabled.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15660
Differential Revision:
D13571324
Pulled By: soumith
fbshipit-source-id:
9b148d081d6e7fa7e1824dfdd93283c67f69e683
Jesse Hellemn [Thu, 3 Jan 2019 01:10:35 +0000 (17:10 -0800)]
Fixing cuda100 smoke tests
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15673
Reviewed By: yf225
Differential Revision:
D13568746
Pulled By: pjh5
fbshipit-source-id:
e636de417d61b48074399da75bfb2576c9f62743
Jerry Zhang [Thu, 3 Jan 2019 00:32:02 +0000 (16:32 -0800)]
Remove PythonOp non-CPU path and PytorchOp (#15417)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15417
Right now the way we test whether Blob contains a CPU tensor is broken in ```PythonOpBase``` is broken, which means non-CPU path might never be taken.
Searching through the codebase, non-gpu path is used in PythonDLPack, and it is used in PytorchOp which is unused. So we'll remove non-gpu path in this diff.
Reviewed By: dzhulgakov
Differential Revision:
D13495011
fbshipit-source-id:
9fe9537f05026d2a2cf7051efa81d184de722710
svcscm [Wed, 2 Jan 2019 22:55:43 +0000 (14:55 -0800)]
Updating submodules
Reviewed By: yns88
fbshipit-source-id:
bb142e8f91046cc2b7ea32dac46ec0753b4bc218
Michael Suo [Wed, 2 Jan 2019 22:32:00 +0000 (14:32 -0800)]
fix select after chunk op (#15672)
Summary:
Fixes #15669.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15672
Differential Revision:
D13567274
Pulled By: suo
fbshipit-source-id:
a63e6cfc9dacedd4cb99dc51eee452038418001e
Michael Suo [Wed, 2 Jan 2019 20:50:13 +0000 (12:50 -0800)]
make flake8 failure blocking (#15675)
Summary:
Right now it just prints whatever flake8 errors and moves forward with the commit. This is too easy to miss.
It should block the commit so that the user can fix the issue
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15675
Differential Revision:
D13567821
Pulled By: suo
fbshipit-source-id:
5f0de40ddd771bad8d6848417408cffbceb03183
Zachary DeVito [Wed, 2 Jan 2019 20:45:38 +0000 (12:45 -0800)]
redo sleef build fix (#15549)
Summary:
This was accidentally reverted by #14866
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15549
Differential Revision:
D13549674
Pulled By: zdevito
fbshipit-source-id:
e209aac53dccb082b91cfa2d292310eabeb459e3
Jongsoo Park [Wed, 2 Jan 2019 19:25:41 +0000 (11:25 -0800)]
format conv_test.py to prepare
D13562099 (#15632)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15632
Just formatting and a few lints.
Reviewed By: yinghai
Differential Revision:
D13562403
fbshipit-source-id:
c56f8ee61f68cdaccc0828a764ff729454f68259
kiendang [Wed, 2 Jan 2019 08:18:07 +0000 (00:18 -0800)]
Fix torch.gesv args in doc
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15649
Differential Revision:
D13564312
Pulled By: soumith
fbshipit-source-id:
b3bba2ece600880077eb09b092ce17e331995bd6
surgan12 [Wed, 2 Jan 2019 07:09:45 +0000 (23:09 -0800)]
clamp fixes (#15479)
Summary: fix to #15338 .
Differential Revision:
D13564343
Pulled By: soumith
fbshipit-source-id:
be64b572945533e10ae6f627d335b47f093720a3
svcscm [Wed, 2 Jan 2019 03:41:31 +0000 (19:41 -0800)]
Updating submodules
Reviewed By: cdelahousse
fbshipit-source-id:
acb68439e62ea270af22364183a6ecba883fab66
svcscm [Wed, 2 Jan 2019 01:20:19 +0000 (17:20 -0800)]
Updating submodules
Reviewed By: cdelahousse
fbshipit-source-id:
5c5ad6a5cc9220ee1dd9565d64c7459f866ff74d
Alexander Rodin [Mon, 31 Dec 2018 02:05:29 +0000 (18:05 -0800)]
Fix typo in documentation
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15628
Differential Revision:
D13562685
Pulled By: soumith
fbshipit-source-id:
1621fcff465b029142313f717035e935e9159513
vishwakftw [Sun, 30 Dec 2018 20:39:10 +0000 (12:39 -0800)]
Make btriunpack work for high dimensional batches and faster than before (#15286)
Summary:
Changelog:
- Optimize btriunpack by using `torch.where` instead of indexing, inplace operations instead of out place operations and avoiding costly permutations by computing the final permutation over a list.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15286
Differential Revision:
D13562038
Pulled By: soumith
fbshipit-source-id:
e2c94cfab5322bf1d24bf56d7b056619f553acc6
Xiaomeng Yang [Sun, 30 Dec 2018 12:13:54 +0000 (04:13 -0800)]
Add count_include_pad arg for average_pool_op on CPU (#15593)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15593
Add count_include_pad arg for average_pool_op on CPU
Reviewed By: houseroad
Differential Revision:
D13558123
fbshipit-source-id:
188879ec3af313105ff66ac0b5a81ea44fca2855
vishwakftw [Sun, 30 Dec 2018 01:50:32 +0000 (17:50 -0800)]
Remove TH/THC link for cholesky (#15595)
Summary:
Changelog:
- Remove TH/THC binding
- Port single matrix case to ATen
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15595
Differential Revision:
D13561657
Pulled By: soumith
fbshipit-source-id:
65f8c4b455cf19a0c7b6aeac2e3b985c7a7208f8
Christoph [Sun, 30 Dec 2018 01:48:36 +0000 (17:48 -0800)]
Concatenate directly into shared memory when constructing batches for numpy (#14534)
Summary:
Since #1323 tensors are shared with shared memory, but this feature is not active for numpy.
This PR fix this.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14534
Differential Revision:
D13561649
Pulled By: soumith
fbshipit-source-id:
b6bc9e99fb91e8b675c2ef131fba9fa11c1647c0
Mark Harfouche [Sun, 30 Dec 2018 00:09:12 +0000 (16:09 -0800)]
Add a patch for OSX with SDK<10.12 (#15615)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/15614
Build passing on SDK 10.9
https://dev.azure.com/ramonaoptics/feedstock-builds/_build/results?buildId=13
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15615
Differential Revision:
D13561737
Pulled By: soumith
fbshipit-source-id:
2ab0f78338d4949fa3f2735915fd96dce4bcd621
Gao, Xiang [Sat, 29 Dec 2018 06:38:24 +0000 (22:38 -0800)]
Fix typo: szie -> size
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15466
Differential Revision:
D13536343
Pulled By: soumith
fbshipit-source-id:
cb3df30bf346ef6bc0bc1b6430107b3e0e086f8d
peter [Sat, 29 Dec 2018 06:10:08 +0000 (22:10 -0800)]
Make the warning suppression safer (#15560)
Summary:
Address the problem introduced in https://github.com/pytorch/pytorch/pull/15499#issuecomment-
450038494.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15560
Differential Revision:
D13561346
Pulled By: soumith
fbshipit-source-id:
6abf622672bdcb77ae1a7188e8a3817fa97aecbc
Jongsoo Park [Sat, 29 Dec 2018 01:32:11 +0000 (17:32 -0800)]
add NCHW2NHWC and NHWC2NCHW in utils.py (#15588)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15588
Use NHWC2NCHW or NCHW2NHWC functions which is easier to understand compared to code using transpose and generalizable to non-2D convolutions.
Reviewed By: csummersea
Differential Revision:
D13557674
fbshipit-source-id:
c4fdb8850503ea58f6b17b188513ae2b29691ec0
Vishwak Srinivasan [Sat, 29 Dec 2018 00:51:45 +0000 (16:51 -0800)]
Remove TH/THC link for gesv (#15510)
Summary:
This PR removes the TH/THC binding for gesv.
Changelog:
- Remove TH/THC binding
- Port single matrix case to ATen
- Enable test_gesv for CUDA as well
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15510
Differential Revision:
D13559990
Pulled By: soumith
fbshipit-source-id:
9da2825e94d3103627e719709e6b1f8b521a07fb
Dong Li [Fri, 28 Dec 2018 23:00:41 +0000 (15:00 -0800)]
keep extra_info of each op in ProfDagStats (#15244)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15244
This DIFF keeps track of the extra_info information attached to each operator. When getPerOpStas() is called, it attaches the extra_info to the result ProfDagStats protobuf.
Facebook
Net transform attaches a global_op_id which is defined as a tuple of (orig_net_name, original_op_index) to each operator,
The global_op_id is encoded as extra_info in each operator.
Reviewed By: aazzolini
Differential Revision:
D13016289
fbshipit-source-id:
3e2719ec7ed0ebe47740b77581c565ff7e79b102
David Riazati [Fri, 28 Dec 2018 21:52:01 +0000 (13:52 -0800)]
Error when torch.load-ing a JIT model (#15578)
Summary:
Throw a warning when calling `torch.load` on a zip file
Fixes #15570
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15578
Differential Revision:
D13555954
Pulled By: driazati
fbshipit-source-id:
a37ecdb3dd0c23eff809f86e2f8b74cd48ff7277
SsnL [Fri, 28 Dec 2018 19:51:26 +0000 (11:51 -0800)]
default_collate should collate bool list to byte tensors (#14669)
Summary:
Based on #15331 . Review only the last commit.
Fixes https://github.com/pytorch/pytorch/issues/14507.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14669
Reviewed By: ezyang
Differential Revision:
D13528725
Pulled By: soumith
fbshipit-source-id:
f12f1ac1c4ff2a3ddd6877c0c096a5da3a1ffa3c
Jongsoo Park [Fri, 28 Dec 2018 19:49:22 +0000 (11:49 -0800)]
append caffe2 prefix to dnnlowp cmd line options (#15582)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15582
Following convention of having caffe2_ prefix in command line options
Reviewed By: viswanathgs
Differential Revision:
D13252055
fbshipit-source-id:
142a6395b832f211f34d0a87ec2d62c1e5fcdc69
Jesse Hellemn [Fri, 28 Dec 2018 18:44:47 +0000 (10:44 -0800)]
adding nightly build smoke tests to circleci
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15441
Reviewed By: yf225
Differential Revision:
D13552399
Pulled By: pjh5
fbshipit-source-id:
4a52ee2d08324b9ab6b8c266ad6a1cd3bdad1c71
Lingyi Liu [Fri, 28 Dec 2018 01:13:50 +0000 (17:13 -0800)]
add the int support (#15581)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15581
as title
Reviewed By: protonu
Differential Revision:
D13556274
fbshipit-source-id:
ba21f0970257d526e2fe7574eea4f89465b9c618
Will Feng [Fri, 28 Dec 2018 01:12:27 +0000 (17:12 -0800)]
Move VariableImpl functions to AutogradMeta and Variable (#15487)
Summary:
In this PR, we are moving all functions away from `Variable::Impl`, in order to get rid of `Variable::Impl` (and the `data_` Tensor in it) in the next PR. Some of the functions (such as `set_requires_grad` / `requires_grad` / `grad`) will be living in `AutogradMeta` class, while others (such as `backward()` / `rebase_history()` / `grad_accumulator()` / `grad_fn()`) will be living in `Variable` class.
This is the 2nd PR mentioned in https://github.com/pytorch/pytorch/issues/13638.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15487
Differential Revision:
D13553173
Pulled By: yf225
fbshipit-source-id:
691f9432d0cd0640af380c757f3e3a2f64f8851c
Roy Li [Fri, 28 Dec 2018 01:01:19 +0000 (17:01 -0800)]
test basic tensor interop
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12249
Differential Revision:
D13469356
Pulled By: li-roy
fbshipit-source-id:
b49748462aa44ac34b8ce79783f2c895a537a232
David Riazati [Thu, 27 Dec 2018 23:58:32 +0000 (15:58 -0800)]
Allow int/float cast to bool (#13391)
Summary:
This PR adds explicit `bool()` casts to match Python semantics
`bool(1) = True`
`bool(0) = False`
`bool(0.0) = False`
`bool(0.1) = True`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13391
Differential Revision:
D12871213
Pulled By: driazati
fbshipit-source-id:
773a48b2647973138efe854abe725d647f1d727d
Elias Ellison [Thu, 27 Dec 2018 23:35:24 +0000 (15:35 -0800)]
remove print ops before exporting onnx graph (#15550)
Summary:
Removing print ops before exporting onnx graph, fixes https://github.com/pytorch/pytorch/issues/15505
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15550
Differential Revision:
D13551195
Pulled By: eellison
fbshipit-source-id:
1ea1e34cb5b8433eacc2b86fb10b241198af96be
Igor Fedan [Thu, 27 Dec 2018 23:24:22 +0000 (15:24 -0800)]
Added deviceCount() virtual method to DeviceGuardImplInterface (#15574)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15574
Added deviceCount() virtual method to DeviceGuardImplInterface, also added correspondent implementation for CPUGuardImpl, CUDAGuardImpl, FakeGuardImpl, VirtualGuardImpl, HIPGuardImplMasqueradingAsCUDA
Reviewed By: soumith
Differential Revision:
D13554609
fbshipit-source-id:
913bf2aad44a0a356efe54505ee4abaf6c4622db
Gregory Chanan [Thu, 27 Dec 2018 23:20:42 +0000 (15:20 -0800)]
Port torch.range to aten and parallelize on CPU.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15484
Differential Revision:
D13538955
Pulled By: gchanan
fbshipit-source-id:
ee3889ad116988d963e603621310b3bbdce0aec9
Lu Fang [Thu, 27 Dec 2018 22:42:01 +0000 (14:42 -0800)]
Export group norm as ATen and add test (#15569)
Summary:
Short term solution, export group norm as an ATen op to unblock users.
Long term will add GroupNorm to onnx.
Add an end to end test for this one.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15569
Differential Revision:
D13554293
Pulled By: houseroad
fbshipit-source-id:
b4974c9ea2a1b81338ca1e5c6747efe2715d7932
SsnL [Thu, 27 Dec 2018 22:06:23 +0000 (14:06 -0800)]
Update cuda.get/set_rng_state doc (#14324)
Summary:
Now that `cuda.get/set_rng_state` accept `device` objects, the default value should be an device object, and doc should mention so.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14324
Reviewed By: ezyang
Differential Revision:
D13528707
Pulled By: soumith
fbshipit-source-id:
32fdac467dfea6d5b96b7e2a42dc8cfd42ba11ee
Marat Dukhan [Thu, 27 Dec 2018 19:55:02 +0000 (11:55 -0800)]
Update QNNPACK (#15561)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15561
- Update QNNPACK submodule to master (API-incompatible)
- Do matching changes in Caffe2 Int8 operators
Reviewed By: dreiss
Differential Revision:
D13551322
fbshipit-source-id:
066f9087061167f7d7cfbc1c8f8628dfa93d056e
Michael Suo [Thu, 27 Dec 2018 18:53:58 +0000 (10:53 -0800)]
Revert
D13552080: [pytorch][PR] add clang-format check to CI
Differential Revision:
D13552080
Original commit changeset:
462a73894c16
fbshipit-source-id:
ebfc5aa3343cebabbc24ff39e4e9841a372443e2
daquexian [Thu, 27 Dec 2018 09:59:56 +0000 (01:59 -0800)]
Fix wrong class name in jit _make_fail (#15559)
Summary:
It should be ScriptModule rather than TracedModule :)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15559
Differential Revision:
D13552058
Pulled By: soumith
fbshipit-source-id:
0aa17639c225818b00d59daec4bc2336f039f658
Michael Suo [Thu, 27 Dec 2018 06:17:59 +0000 (22:17 -0800)]
add clang-format check to CI (#15543)
Summary:
Simple check that runs against your PR's changes and complains if running clang-format would have created a change. Does nothing when run against master, so it's "safe" to accept changes that fail this check and it won't break the build.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15543
Reviewed By: soumith
Differential Revision:
D13552080
Pulled By: suo
fbshipit-source-id:
462a73894c16e7108806af7fa88440c377d4d0d2
Ailing Zhang [Thu, 27 Dec 2018 03:43:10 +0000 (19:43 -0800)]
Fix github branch prefix v (#15552)
Summary:
Fixes #15519 .
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15552
Differential Revision:
D13550780
Pulled By: ailzhang
fbshipit-source-id:
b117e5ced42de207b91045bffcee8907dd73201e
Viswanath Sivakumar [Thu, 27 Dec 2018 02:01:20 +0000 (18:01 -0800)]
Rotated boxes support for GPU GenerateProposals op (#15470)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15470
On top of
D13509114 and
D13017791. Pretty straight-forward.
Reviewed By: newstzpz
Differential Revision:
D13536671
fbshipit-source-id:
ff65981b70c63773ccc9aef3ff28e3c9508f6716
Viswanath Sivakumar [Thu, 27 Dec 2018 02:01:20 +0000 (18:01 -0800)]
CUDA kernel for rotated NMS support, over 200x speedup than CPU (#15365)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15365
On top of
D13017791, adding rotated NMS support with the same kernel building
blocks. Results in 218x speedup on avg.
Reviewed By: SuperIRabbit
Differential Revision:
D13509114
fbshipit-source-id:
c1d33c8dc4bc50b5906b4f01bb0caf1115e2a357
Will Feng [Thu, 27 Dec 2018 00:31:47 +0000 (16:31 -0800)]
Move autograd metadata from VariableImpl to TensorImpl (#13827)
Summary:
Changes originally in this PR:
1. Move Variable::Impl data members into TensorImpl as `AutogradMeta` struct
2. Change Variable::Impl functions to use data members in `AutogradMeta` struct
3. Add `shallow_copy_and_detach()` function to each subclass of TensorImpl
4. Do shallow copy when the user calls `make_variable(tensor)` / `make_variable_view(tensor)` / `variable.set_data(tensor)` / `variable.detach()`
Changes moved from https://github.com/pytorch/pytorch/pull/13645:
1. Add a flag to Variable to disallow size/stride/storage_ptr changes from in-place operations such as `resize_` / `resize_as_` / `set_` / `transpose_`, and set this flag to true when people call `tensor.data` in Python.
2. Write text in the docs to actively discourage changing the shape or storage of `tensor_detached` and expecting `tensor` to also be updated.
This is the 1st+2nd PR mentioned in https://github.com/pytorch/pytorch/issues/13638.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13827
Differential Revision:
D13507173
Pulled By: yf225
fbshipit-source-id:
b177b08438d534a8197e34e1ad4a837e2db0ed6a
Soumith Chintala [Wed, 26 Dec 2018 23:41:46 +0000 (15:41 -0800)]
version bump to 1.1 (#15554)
Summary:
version bump to 1.1
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15554
Differential Revision:
D13550818
Pulled By: soumith
fbshipit-source-id:
8a28582c98b42c081e103581551a01fd96c9f42d
derek [Wed, 26 Dec 2018 20:54:17 +0000 (12:54 -0800)]
In README.md CMAKE_PREFIX_PATH should be CONDA_PREFIX when using an conda virtual environment (#15548)
Summary:
In current README.md, `CMAKE_PREFIX_PATH` is set to conda root even when you have activated an virtual environment. When an conda virtualenv is activated, packages are installed in `CONDA_PREFIX`, not conda root. I think `CMAKE_PREFIX_PATH` should also be set to `CONDA_PREFIX` in this case. I think some build issues can be solved with the new instruction. Maybe something like #14954.
soumith,
When I made PR #15335 I was confused and made a wrong point. I think this PR could be the real solution.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15548
Differential Revision:
D13549681
Pulled By: soumith
fbshipit-source-id:
42d855b6e49ee58d735d2f4715d3e5752a748693
David Pollack [Wed, 26 Dec 2018 16:31:00 +0000 (08:31 -0800)]
add from_pretrained method to EmbeddingBag (#15273)
Summary:
The `EmbeddingBag` module does not include a `from_pretrained` method like the `Embedding` module. I added it for consistency between the two modules.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15273
Differential Revision:
D13547842
Pulled By: soumith
fbshipit-source-id:
8ffde51ff0c1e8fc8310263b6f375da88089ff7d
vishwakftw [Wed, 26 Dec 2018 16:29:57 +0000 (08:29 -0800)]
Make argument size checking consistent across CPU and CUDA for torch.gesv (#15430)
Summary:
There is an inconsistency in the size of arguments for gesv, which is fixed in this PR.
Changelog:
- Replicate check in CPU as done for CUDA
- Fix argument ordering (minor) in CUDA checking
Fixes #15328
Differential Revision:
D13531167
Pulled By: soumith
fbshipit-source-id:
c4b4e4fc12880208d08e88d1e47e730ac98c2ad3
Michael Suo [Wed, 26 Dec 2018 14:52:25 +0000 (06:52 -0800)]
clang format world (#15524)
Summary:
The PR clang-formats everything in `torch/csrc/jit/` and adds it to the pre-commit hook.
Here is a list of non-mechanical changes:
- I went over each file and fixed up whenever I could tell that clang-format was clobbering comment formatting.
- Made the macros in register_prim_ops a little more clang-format friendly by omitting trailing commas
- Refactored autodiff.cpp to use a helper class with explicit state rather than a bunch of capturing lambdas
- Small improvements to the precommit hook clang-format
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15524
Differential Revision:
D13547989
Pulled By: suo
fbshipit-source-id:
3ff1541bb06433ccfe6de6e33f29227a2b5bb493
Frank Zhang [Wed, 26 Dec 2018 14:32:44 +0000 (06:32 -0800)]
Added correct isinf handling for Integral tensors (#15489)
Summary:
Currently torch.isinf on integral tensor will raise RuntimeError: value cannot be converted to type int16_t without overflow: inf.
This pr will suppress the error and return false(0) for all integral tensors. The behavior will also be consistent with np.isinf
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15489
Reviewed By: zou3519
Differential Revision:
D13540786
Pulled By: flashhack
fbshipit-source-id:
e730dea849da6a59f3752d347bcfbadfd12c6483
Derek Kim [Wed, 26 Dec 2018 10:11:17 +0000 (02:11 -0800)]
Trivial comment update in autograd/function.h (#15529)
Summary:
I removed the explanation on `num_inputs` parameter. This parameter was removed in #8168
colesbury
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15529
Differential Revision:
D13547854
Pulled By: soumith
fbshipit-source-id:
8a9ac58f2c93a2533b82ec63089477166ed0bcb9
peter [Wed, 26 Dec 2018 08:46:13 +0000 (00:46 -0800)]
Fix failed type cast in Windows Debug Build (#15333)
Summary:
Fixes #15330
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15333
Differential Revision:
D13531317
Pulled By: soumith
fbshipit-source-id:
b956f27bd7fa33cbdf405338fcbcbc7df2fd629f
Gu, Jinghui [Wed, 26 Dec 2018 06:54:16 +0000 (22:54 -0800)]
Upgrade MKL-DNN to version 0.17 and static build MKL-DNN (#15504)
Summary:
Upgrade MKl-DNN to 0.17 and static build MKL-DNN to fix the potentail build error due to old mkldnn version in host system.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15504
Differential Revision:
D13547885
Pulled By: soumith
fbshipit-source-id:
46f790a3d9289c1e153e51c62be17c5206ea8f9a
Soumith Chintala [Wed, 26 Dec 2018 05:55:26 +0000 (21:55 -0800)]
remove legacy from docs (#15112)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/15062
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15112
Differential Revision:
D13547845
Pulled By: soumith
fbshipit-source-id:
61e3e6c6b0f6b6b3d571bee02db2938ea9698c99
Alexander Rodin [Wed, 26 Dec 2018 05:43:38 +0000 (21:43 -0800)]
Use at::zeros instead of torch::zeros in non-differentiable example (#15527)
Summary:
There was a typo in C++ docs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15527
Differential Revision:
D13547858
Pulled By: soumith
fbshipit-source-id:
1f5250206ca6e13b1b1443869b1e1c837a756cb5
peter [Wed, 26 Dec 2018 05:43:22 +0000 (21:43 -0800)]
Fix the compare logic in function `overflows` for MSVC (#15499)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/15497.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15499
Differential Revision:
D13547835
Pulled By: soumith
fbshipit-source-id:
a674da93bf905a0b81f0cc60449ccb97c2746926
SsnL [Mon, 24 Dec 2018 17:08:50 +0000 (09:08 -0800)]
Allow converting char tensor to numpy; add [fi]info.min (#15046)
Summary:
https://github.com/pytorch/pytorch/pull/14710 with test fixed.
Also added `finfo.min` and `iinfo.min` to get castable tensors.
cc soumith
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15046
Reviewed By: soumith
Differential Revision:
D13429388
Pulled By: SsnL
fbshipit-source-id:
9a08004419c83bc5ef51d03b6df3961a9f5dbf47
Lin Huang [Mon, 24 Dec 2018 14:29:34 +0000 (06:29 -0800)]
Port replication_pad1d to ATen (#15507)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15507
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15485
port replication_pad1d
Reviewed By: ezyang
Differential Revision:
D13531920
fbshipit-source-id:
dcd64ebd2c24b7431996231b8d5addfb600b1072
Peter Goldsborough [Mon, 24 Dec 2018 14:23:32 +0000 (06:23 -0800)]
Support stateful dataset (#15096)
Summary:
Currently re-implements the dataloader for stateful datasets. Outstanding work:
- Refactor DataLoader and DataLoader2 to have common base classes and only differ in specifi pieces of logic,
- Figure out how to not duplicate the `MapDataset` logic for stateful vs. non-stateful
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15096
Differential Revision:
D13522043
Pulled By: goldsborough
fbshipit-source-id:
08e461ca51783047f11facc4d27dfa2e4f1e4c2a
Michael Suo [Mon, 24 Dec 2018 13:34:17 +0000 (05:34 -0800)]
put interactive prompt in bash (#15521)
Summary:
This makes compatibility with different versions of python a little bit simpler, and fixes a problem where stdin wasn't being read from the terminal properly in the prompt.
zdevito This should fix your EOF exception.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15521
Differential Revision:
D13546358
Pulled By: suo
fbshipit-source-id:
fb7551a86c888196831c046d9d9848e7ff05b925
peter [Mon, 24 Dec 2018 03:47:03 +0000 (19:47 -0800)]
Fix the iterator category for torch::data::Iterator (#15500)
Summary:
Try to fix https://github.com/pytorch/pytorch/issues/14410.
Additional info: From this [page](https://stackoverflow.com/questions/
14062297/canonical-way-to-define-forward-output-iterator), If we change it into `input_iterator_tag`, it doesn't mean the `output_iterator_tag` is lost.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15500
Differential Revision:
D13545773
Pulled By: soumith
fbshipit-source-id:
327bfb7be83d53e42925e0e391b2a4277e3a1b36
Michael Suo [Sun, 23 Dec 2018 22:35:41 +0000 (14:35 -0800)]
Precommit hook: just warn if no clang-tidy (#15514)
Summary:
The precommit hook shouldn't hard fail if there's no `clang-tidy`, just warn and omit the check.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15514
Differential Revision:
D13545776
Pulled By: suo
fbshipit-source-id:
9bf3f8ee18703c6d1a39eb7776092fb5e120d2a1
Gao, Xiang [Sun, 23 Dec 2018 22:28:31 +0000 (14:28 -0800)]
Add torch.rot90 to torch.rst
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15512
Differential Revision:
D13545775
Pulled By: soumith
fbshipit-source-id:
2a8896571745630cff4aaf3d5469ef646bdcddb4
Brennan Vincent [Sun, 23 Dec 2018 20:49:08 +0000 (12:49 -0800)]
fix parallelization detection for CPU foreach_reduced_elt (#15483)
Summary:
This does two things:
(1): revert #15114 , which is incorrect and actually just completely disables parallelization in this function (because `at::get_num_threads` returns `-1` unless it has been set explicitly)
(2): Fix our (FB-internal) failing tests that #15114 was intended to fix, by still working correctly in a setup where `#ifdef _OPENMP` is set and `omp_get_max_threads() > 1` , but `#pragma omp parallel` only launches one thread. I believe such an unusual situation only exists in certain unit tests within FB infra but we still need it to work.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15483
Differential Revision:
D13538940
Pulled By: umanwizard
fbshipit-source-id:
a3362c7ac7327ced350d127bb426f82c59e42732
Jongsoo Park [Sat, 22 Dec 2018 18:22:56 +0000 (10:22 -0800)]
add rowwise adagrad lp test (#15082)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15082
We didn't have unit test for low-precision rowwise adagrad
Reviewed By: chocjy
Differential Revision:
D13300732
fbshipit-source-id:
46e7bdfc82c5a6855eeb6f653c0a96b0b3a20546
Jongsoo Park [Sat, 22 Dec 2018 06:17:35 +0000 (22:17 -0800)]
handle empty inputs to SparseLengthsMean correctly (#15389)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15389
SparseLengthsMean was generating uninitialized data for empty inputs (lengths == 0). We should return zeros.
The unit tests were also not covering this special case which is fixed by this diff.
Reviewed By: salexspb
Differential Revision:
D13515970
fbshipit-source-id:
3c35265638f64f13f0262cee930c94f8628005da
Hao Lu [Sat, 22 Dec 2018 04:23:14 +0000 (20:23 -0800)]
Add pthreadpool_create and pthreadpool_destroy (#15492)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15492
Add pthreadpool_create and pthreadpool_destroy, which are used by NNPACK tests.
Reviewed By: Maratyszcza
Differential Revision:
D13540997
fbshipit-source-id:
628c599df87b552ca1a3703854ec170243f04d2e
Pritam Damania [Sat, 22 Dec 2018 01:34:51 +0000 (17:34 -0800)]
Metadata for input/output formats in model file proto. (#15252)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15252
We would like to extend the model file format to include strongly type, semantic information
about the model inputs and outputs.
The goal is for a user to be able to consider a model file like a function with
a well defined API describing what the inputs and outputs would be.
Reviewed By: dzhulgakov
Differential Revision:
D13009915
fbshipit-source-id:
5df124a876ad03c05fbdaacae0eab659637734c1
Zachary DeVito [Sat, 22 Dec 2018 00:44:19 +0000 (16:44 -0800)]
add len to nativeResolver (#15488)
Summary:
(otherwise len is not resolvable using torch::jit::compile)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15488
Differential Revision:
D13539991
Pulled By: zdevito
fbshipit-source-id:
3ba85fa7b1adb163f9229c568f7997d22321903d
David Riazati [Sat, 22 Dec 2018 00:30:35 +0000 (16:30 -0800)]
Remove NoneGenerator
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15335
Differential Revision:
D13540357
Pulled By: driazati
fbshipit-source-id:
a289e5944b65872103f68faac74e18f10e7c6fff
David Riazati [Fri, 21 Dec 2018 23:59:29 +0000 (15:59 -0800)]
Add self to Python printer reserved words (#15318)
Summary:
This adds `self` to the list of reserved words and also sorts the lines and prevents the tracer from naming values 'self' (which happens in torch/tensor.py)
Fixes #15240
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15318
Differential Revision:
D13540192
Pulled By: driazati
fbshipit-source-id:
46ae02e51b1b31d5c62110fa83ba258ea6bada27
Ailing Zhang [Fri, 21 Dec 2018 23:32:44 +0000 (15:32 -0800)]
AD support for adaptive_avg_pool2d (#15459)
Summary:
This adds AD support for adaptive_avg_pool2d, which is necessary for resnet50 in pytorch/vision:master. cc: soumith asuhan dlibenzi
apaszke I saw that autodiff bug you fixed in #15403 , as it doesn't prevent this PR from passing, so I'll leave it for your PR to fix it. :)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15459
Differential Revision:
D13534732
Pulled By: ailzhang
fbshipit-source-id:
4e48b93e35d5ecfe7bd64b6a132a55b07843f206
Hao Lu [Fri, 21 Dec 2018 23:05:12 +0000 (15:05 -0800)]
Handling nullptr case
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15467
Reviewed By: Maratyszcza
Differential Revision:
D13536504
fbshipit-source-id:
ab46ff6bb4b6ce881c3e29d7e6a095ea62289db4
Bram Wasti [Fri, 21 Dec 2018 22:11:26 +0000 (14:11 -0800)]
Relax check on outputs (#15458)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15458
many nets in the wild seem to have outputs that are never produced by the net.
Reviewed By: ZolotukhinM
Differential Revision:
D13534185
fbshipit-source-id:
2b23b39c28404c53f68868f3bf6df53c5fea9eab
Zachary DeVito [Fri, 21 Dec 2018 21:46:12 +0000 (13:46 -0800)]
allow non-final returns (#15463)
Summary:
This PR allows a subclass of programs that have return statements that are not final in the graph.
`final_returns.h` contains the a comment describing how this is accomplished.
To minimize complexity in `compiler.cpp`, this pass is done as an AST-to-AST rewrite before the compiler runs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15463
Differential Revision:
D13538962
Pulled By: zdevito
fbshipit-source-id:
67105ca873351825b4a364092ab1873779f3e462
derek [Fri, 21 Dec 2018 19:54:57 +0000 (11:54 -0800)]
Fixed trivial typos in Dropout2D and Dropout3D classes (#15200)
Summary:
Fixed trivial typos in Dropout2D and Dropout3D classes
weiyangfb
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15200
Differential Revision:
D13537888
Pulled By: ezyang
fbshipit-source-id:
8fb06027ca663a2e4bfa016af400698ae3c88ad1
svcscm [Fri, 21 Dec 2018 19:44:29 +0000 (11:44 -0800)]
Updating submodules
Reviewed By: cdelahousse
fbshipit-source-id:
59d7a5b82fb78bc2d2285d0896e35c262512ffb9
surgan12 [Fri, 21 Dec 2018 19:32:02 +0000 (11:32 -0800)]
eq_fixes (#15475)
Summary:
fixes #15464 .
cc : ezyang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15475
Differential Revision:
D13537812
Pulled By: ezyang
fbshipit-source-id:
127adf612ac8b3d3a64baa3d12a53daba7d3e4b8
vishwakftw [Fri, 21 Dec 2018 19:29:36 +0000 (11:29 -0800)]
Enable running collect_env.py without building PyTorch (#15468)
Summary: Closes #15346
Differential Revision:
D13537873
Pulled By: ezyang
fbshipit-source-id:
7765ce4108dae9479d8900c0815cc2f174596a83