Commit Graph

29 Commits

Author SHA1 Message Date
Natalia Gimelshein
db5e5781ad replace all remaining occurrences of deadline=1000, to prevent test flakiness
Summary: Per title

Test Plan: Fixes existing tests

Reviewed By: robieta

Differential Revision: D28690296

fbshipit-source-id: d7b5b5065517373b75d501872814c89b24ec8cfc
2021-05-25 15:55:30 -07:00
Bugra Akyildiz
27c7158166 Remove __future__ imports for legacy Python2 supports (#45033)
Summary:
There is a module called `2to3` which you can target for future specifically to remove these, the directory of `caffe2` has the most redundant imports:

```2to3 -f future -w caffe2```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/45033

Reviewed By: seemethere

Differential Revision: D23808648

Pulled By: bugra

fbshipit-source-id: 38971900f0fe43ab44a9168e57f2307580d36a38
2020-09-23 17:57:02 -07:00
Christopher Whelan
5cd0f5e8ec [PyFI] Update hypothesis and switch from tp2 (#41645)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41645

Pull Request resolved: https://github.com/facebookresearch/pytext/pull/1405

Test Plan: buck test

Reviewed By: thatch

Differential Revision: D20323893

fbshipit-source-id: 54665d589568c4198e96a27f0ed8e5b41df7b86b
2020-08-08 12:13:04 -07:00
lcskrishna
302cf6835e [ROCm][Caffe2] Enable MIOpen 3D Pooling (#38260)
Summary:
This PR contains the following updates:
1. MIOpen 3D pooling enabled in Caffe2.
2. Refactored the MIOpen pooling code in caffe2.
3. Enabled unit test cases for 3D pooling.

CC: ezyang jeffdaily ashishfarmer

Pull Request resolved: https://github.com/pytorch/pytorch/pull/38260

Differential Revision: D21524754

Pulled By: xw285cornell

fbshipit-source-id: ddfe09dc585cd61e42eee22eff8348d326fd0c3b
2020-07-08 17:42:55 -07:00
Brian Wignall
f326045b37 Fix typos, via a Levenshtein-type corrector (#31523)
Summary:
Should be non-semantic.

Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos, with https://github.com/bwignall/typochecker to help automate the checking.

Uses an updated version of the tool used in https://github.com/pytorch/pytorch/pull/30606 .
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31523

Differential Revision: D19216749

Pulled By: mrshenli

fbshipit-source-id: 7fd489cb9a77cd7e4950c1046f925d57524960ea
2020-01-17 16:03:19 -08:00
Brian Wignall
e7fe64f6a6 Fix typos (#30606)
Summary:
Should be non-semantic.

Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30606

Differential Revision: D18763028

Pulled By: mrshenli

fbshipit-source-id: 896515a2156d062653408852e6c04b429fc5955c
2019-12-02 20:17:42 -08:00
rohithkrn
aa88c2c0b6 Unify gpu_support variable in python tests (#16748)
Summary:
Assign `has_gpu_support = has_cuda_support or has_hip_support` and make according changes in python tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16748

Differential Revision: D13983132

Pulled By: bddppq

fbshipit-source-id: ca496fd8c6ae3549b736bebd3ace7fa20a6dad7f
2019-02-07 00:29:51 -08:00
Xiaomeng Yang
4ae9ab24b6 Update conv_base to support empty batch (#16603)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16603

Update conv_base to support empty batch

Reviewed By: houseroad

Differential Revision: D13894111

fbshipit-source-id: fc4370ff16ba6046f374e77bd845d28e6af05ea3
2019-01-31 23:46:18 -08:00
Xiaomeng Yang
7536887cb7 Add count_include_pad for avg_pool on CuDNN (#16100)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16100

Add count_include_pad for avg_pool on CuDNN

Reviewed By: houseroad

Differential Revision: D13707959

fbshipit-source-id: 261f5d116066fef75cf9a5787dfbc5d12b5b9f9b
2019-01-17 02:10:12 -08:00
Xiaomeng Yang
7a5f782c2e Fix max_pool_grad test (#16088)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16088

Fix max_pool_grad test

Reviewed By: houseroad

Differential Revision: D13700917

fbshipit-source-id: f4f942ee920bcd943c38a8f8a6aafd1d13c4515f
2019-01-16 15:32:27 -08:00
Xiaomeng Yang
13f38ab79d Add count_include_pad to average_pool_gradient_op (#15997)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15997

Add count_include_pad to average_pool_gradient_op

Reviewed By: houseroad

Differential Revision: D13648339

fbshipit-source-id: 205cb2acb32dc24a85256b628298b1a11f0ffa2c
2019-01-15 16:56:40 -08:00
Jongsoo Park
d53012b4fe 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
2018-12-28 17:34:50 -08:00
Junjie Bai
ccfaf46431 Make CUDNN an alias of MIOPEN for HIP ops (#12278)
Summary:
This is mostly for reusing all the cudnn test cases in our python operator_tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12278

Differential Revision: D10842592

Pulled By: bddppq

fbshipit-source-id: 4b3ed91fca64ff02060837b3270393bc2f9a9898
2018-10-24 17:07:31 -07:00
Orion Reblitz-Richardson
1d5780d42c Remove Apache headers from source.
* LICENSE file contains details, so removing from individual source files.
2018-03-27 13:10:18 -07:00
Di Yu
cd3e90c16f Fix failed test due to D6665466
Summary: Test in Jenkins fail becasue test_global_pooling_3d filtered too many tests.  We made use of infered value of global_pooling (pad and stride will be constant) to reduce the test samples generated.

Reviewed By: pietern

Differential Revision: D6686840

fbshipit-source-id: d316c0e9f9070b12770170ab9f36e33de68a9ab9
2018-01-09 16:40:35 -08:00
Di Yu
82198831e7 Fix pool op custom path issue 2, wrongful routing to global pooling
Summary:
In D5681122 - when routing to global maxpool and average pool, the condition is not correct.
see T24876217 for discussion

Reviewed By: Yangqing

Differential Revision: D6665466

fbshipit-source-id: dcb5b4686249e6ee8e1e976ab66b003ef09b32fd
2018-01-09 00:54:45 -08:00
Yangqing Jia
77484ecc45 Manually applying cudnn5 pull request.
Summary: TSIA. Closes #1631

Reviewed By: pietern, Maratyszcza

Differential Revision: D6626887

fbshipit-source-id: 1a2dc7c47bc6ce794fdf598fbd547c04029edce4
2018-01-02 15:31:33 -08:00
Yangqing Jia
8286ce1e3a Re-license to Apache
Summary: Closes https://github.com/caffe2/caffe2/pull/1260

Differential Revision: D5906739

Pulled By: Yangqing

fbshipit-source-id: e482ba9ba60b5337d9165f28f7ec68d4518a0902
2017-09-28 16:22:00 -07:00
Catherine Dong
1955d0797e Added fast path for CUDNN global max pooling
Summary:
This adds a fast path for global max pooling with NCHW. Compared to equivalent ReduceBackMean, this is about 3.5x faster.

Based on D5533059.

Reviewed By: akyrola

Differential Revision: D5681122

fbshipit-source-id: 7a4df934044c7dd01888f095f7dd46654aaf4eae
2017-08-23 16:33:06 -07:00
Jerry Zhang
a63e7314f3 Adding 1d-2d-3d Schemas for Conv and Pool
Summary: Add Conv and Pool operators with dimensions.

Reviewed By: bddppq

Differential Revision: D5588614

fbshipit-source-id: 2552c40dc3ca180a6ab51817d60f0b85b97885d5
2017-08-17 09:45:54 -07:00
Aapo Kyrola
ab42a95b6f fast path for CUDNN global average pooling
Summary:
KaimingHe  debugged slow model, and found out that global average pooling was hideously slow, even with CUDNN. Turns out CUDNN pooling op (especially backward pass) is not optimized for global pooling.

This adds a fast path for global average pooling with NCHW. This is about 30x faster than CUDNN with 56 x 56 pooling, Compared to equivalent ReduceBackSum, this is about 3x faster.

I will bootcamp the max pooling.

Reviewed By: asaadaldien

Differential Revision: D5533059

fbshipit-source-id: 2d590693d737fa92184603663031d96f6145f304
2017-08-02 11:10:10 -07:00
Ahmed Taei
32bf7a2c2b Generalize PoolingOp(cuDNN) to compute 2D and 3D pooling.
Reviewed By: akyrola

Differential Revision: D5090689

fbshipit-source-id: f9f11e12adc0ee8db088f3397a8c33aa31eb5deb
2017-05-19 10:19:00 -07:00
Simon Layton
1d0ba2cfbd New cudnn ops
Summary:
cuDNN versions of dropout and LRN (for native fp16 support), port of Caffe's max pooling algo that uses an explicit mask to store locations (also supports fp16 storage)
Closes https://github.com/caffe2/caffe2/pull/396

Reviewed By: akyrola

Differential Revision: D4990880

Pulled By: asaadaldien

fbshipit-source-id: a716acffb656843e9b31e3e6808bd2d8aa959d03
2017-05-08 16:33:21 -07:00
Ahmed Taei
75c2168966 Generalize PoolingOp(CUDA) to compute 1D, 2D and 3D pooling.
Summary: Extend MaxPooling & AvergePooling CUDA ops to compute 1D, 2D & 3D pooling.

Differential Revision: D4866699

fbshipit-source-id: 9bf2d970f2df2b87194a539fc60c07ac19fa1042
2017-04-12 09:16:45 -07:00
Ahmed Taei
09bfc8043b Generalize PoolingOp(CPU) to compute 1D, 2D and 3D pooling.
Summary: Extend the op compute 1D, 2D & 3D pooling.

Differential Revision: D4828691

fbshipit-source-id: 87540e82ed20d1361476cfbc43a708de9ca7a88e
2017-04-11 18:18:21 -07:00
Yangqing Jia
91ebfa3c7c Unit test for big batch size avg pooling
Summary: basically copied test_pooling and hard coded values

Reviewed By: prigoyal

Differential Revision: D4428162

fbshipit-source-id: 6c0444ac8c21f08824df7ff53999a94967607dc4
2017-01-18 19:29:20 -08:00
Yangqing Jia
5eb836880d Add unittest.main() lines to test scripts under python/operator_test
Summary:
Needed by oss.

This is done by running the following line:

  find . -name "*_test.py" -exec sed -i '$ a \\nif __name__ == "__main__":\n    import unittest\n    unittest.main()' {} \;

Reviewed By: ajtulloch

Differential Revision: D4223848

fbshipit-source-id: ef4696e9701d45962134841165c53e76a2e19233
2016-11-29 15:18:37 -08:00
Yangqing Jia
238ceab825 fbsync. TODO: check if build files need update. 2016-11-15 00:00:46 -08:00
Yangqing Jia
44509f9f91 fbsync: mostly lint changes, added mkl files 2016-10-11 22:45:06 -07:00