Commit Graph

26410 Commits

Author SHA1 Message Date
David Reiss
d6b51e4adf In interpolate, join short lines (#37170)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37170

ghstack-source-id: 102773588

Test Plan: CI

Reviewed By: kimishpatel

Differential Revision: D21209998

fbshipit-source-id: 9386e54aa85a5576678d21d443017079028f8dca
2020-05-06 13:03:45 -07:00
David Reiss
59f03c69ab In interpolate, give a short name to scale_factor_list (#37169)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37169

This allows some cleanup of the code below by making lines shorter.
ghstack-source-id: 102773593

Test Plan: Existing tests for interpolate.

Reviewed By: kimishpatel

Differential Revision: D21209988

fbshipit-source-id: cffcdf9a580b15c4f1fa83e3f27b5a69f66bf6f7
2020-05-06 13:03:39 -07:00
David Reiss
4996961826 In interpolate, only call _interp_output_size in one place (#37168)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37168

It looks like this was made a separate function because of the `dim` argument,
but that argument is always equal to `input.dim() - 2`.  Remove the argument
and consolidate all call sites into one.  This also means that this will be
called on paths that previously didn't call it, but all those cases throw
exceptions anyway.
ghstack-source-id: 102773596

Test Plan: Existing tests for interpolate.

Reviewed By: kimishpatel

Differential Revision: D21209993

fbshipit-source-id: 2c274a3a6900ebfdb8d60b311a4c3bd956fa7c37
2020-05-06 13:03:33 -07:00
David Reiss
8749aa2d55 Clean up formatting in upsample ops (#37166)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37166

ghstack-source-id: 102773597

Test Plan: CI

Reviewed By: kimishpatel

Differential Revision: D21210001

fbshipit-source-id: 8e65d638dea72d995d6c079ed8c0b03be0fb813c
2020-05-06 13:03:28 -07:00
David Reiss
78529f6de7 Whitespace cleanup (#37165)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37165

ghstack-source-id: 102773591

Test Plan: CI

Reviewed By: kimishpatel

Differential Revision: D21209997

fbshipit-source-id: c5eef259aade2ad66095231e139ba125e759445b
2020-05-06 13:01:56 -07:00
Xiang Gao
5edf5efd37 Migrate CPU sum, eq, and ne to c10::complex (#37876)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37876

Test Plan: Imported from OSS

Differential Revision: D21426516

Pulled By: anjali411

fbshipit-source-id: 0532e5508ad65e649f3d4d8cde32ff871956c9f7
2020-05-06 12:21:36 -07:00
Nick Gibson
4e2ea6e013 [TensorExpr] Remove the Tensor argument from loopnest.reorderAxis (#37873)
Summary:
Remove the requirement for the axes provided to reorderAxis to come from a Tensor. We were using that to determine the relevant loops, but we can alternatively determine it by traversing the parents of each provided For.

resistor does this work for you?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37873

Differential Revision: D21428016

Pulled By: nickgg

fbshipit-source-id: b16b2f41cb443dfc2c6548b7980731d1e7d89a35
2020-05-06 12:02:15 -07:00
mjavanmard
53e7d49a98 Port register_prim_ops_c10.cpp to new registration API (#37834)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37834

Ported all use sites of the old registration API to use new Integer operator registration API.

Test Plan: Imported from OSS

Differential Revision: D21415700

Pulled By: MohammadMahdiJavanmard

fbshipit-source-id: 34f18757bad1642e1c485bb30c9771f7b7102230
2020-05-06 11:44:37 -07:00
Elias Ellison
0e3a05ec00 [JIT] rename enable_profiling_mode to enable_profiling_mode_for_profiling_tests (#37825)
Summary:
The existing contextmanager only conditionally enabled_profiling_mode, which was counter intuitive. When we changed the default executor it broke internal benchmarking as a result.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37825

Differential Revision: D21404611

Pulled By: eellison

fbshipit-source-id: 306b3c333ef4eb44ab6a6e5ab4e0682e5ce312ce
2020-05-06 11:30:02 -07:00
Xiang Gao
436cd2c02d Migrate check_convert to c10::complex (#37875)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37875

Test Plan: Imported from OSS

Differential Revision: D21426480

Pulled By: anjali411

fbshipit-source-id: e9a474b4f7524aeeb6c63976ff7de9ac38ecefab
2020-05-06 11:13:12 -07:00
Nik Ved
8434247653 modify select_equals_backward to propage only to a single value (#36316)
Summary:
Renames `select_equals_backward` to `select_first_equal_backward` and makes sure it propagates to a single value.
Fixes [https://github.com/pytorch/pytorch/issues/35699](https://github.com/pytorch/pytorch/issues/35699).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36316

Differential Revision: D21403848

Pulled By: albanD

fbshipit-source-id: b260cd79289162ee5733887d2afe8203945baee6
2020-05-06 10:50:24 -07:00
Ailing Zhang
dd618216c5 [JIT]Support adv indexing using list. (#37848)
Summary:
We used to only support indexing through
- numbers like `x[0, 1]`
- tuple like `x[(0, 1)]`
- tensor like `x[torch.tensor([0, 1])]`

This PR adds support for indexing through list which is equivalent to tensor.
- `x[[0, 1, 5]]`
- `x[[0, 1], [0, 1]]`
- `x[[[0, 1], [0, 1]], [[0, 1], [0, 1]]]`

Note for `x[[0, 1, 5]]` we had a bug in AST conversion code so we used to treat it like `x[0, 1, 5]` which means it might accidentally run and produce wrong result(fixes https://github.com/pytorch/pytorch/issues/37286 fixes https://github.com/pytorch/pytorch/issues/18616), now that it's fixed we probably want to mark it as BC breaking.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37848

Reviewed By: suo

Differential Revision: D21409840

Pulled By: ailzhang

fbshipit-source-id: 6f2d962885c6dc009cb384d98be1822f5ca7a189
2020-05-06 10:44:48 -07:00
Mike Ruberry
f2148de92f Revert D21409626: [quant][tests] Enable tests to run on all qengine backends
Test Plan: revert-hammer

Differential Revision:
D21409626

Original commit changeset: 21b23e498f43

fbshipit-source-id: 44cb6d1087c521926c56fa4148c2eb897e03bb98
2020-05-06 10:37:41 -07:00
Shawn Zhong
ec7fd0caef [docs] Fix broken links in contribution_guide.rst and governance.rst (#37820)
Summary:
Fix https://github.com/pytorch/pytorch/issues/37716

Fix three broken links in the documentation:
- [PyTorch Governance](https://pytorch.org/docs/source/community/governance.rst) in the [Contribution Guide page](https://pytorch.org/docs/master/community/contribution_guide.html#the-pytorch-contribution-process)
- [PyTorch Governance | Persons of Interest](https://pytorch.org/docs/source/community/persons_of_interest.rst) under the [Core Developer section](https://pytorch.org/docs/master/community/governance.html#core-developers)
- [PyTorch Contributor Guide](https://pytorch.org/docs/source/community/contribution_guide.rst) under the [FAQ session of the Governance Page](https://pytorch.org/docs/master/community/governance.html#faq)

The old link leads to the `.rst` source file, which does not exist on the server.

It's now fixed using the [document cross-referencing syntax](https://www.sphinx-doc.org/en/1.8/usage/restructuredtext/roles.html#cross-referencing-documents)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37820

Differential Revision: D21414579

Pulled By: mruberry

fbshipit-source-id: ecf6de9317ce93f70205cbfe97a3bdd54e635fe5
2020-05-06 10:33:33 -07:00
Kimish Patel
e729db48ca Remove requantization scale constraint. (#37683)
Summary:
Now that we landed float requantization for conv/linear, we do not need
the constraint for requant_scale < 1.
Removing that.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37683

Test Plan: Quantization tests

Differential Revision: D21412536

Pulled By: kimishpatel

fbshipit-source-id: c932b5ab3aa40407e9d7f0c877e2fe7fd544f8a7
2020-05-06 10:23:08 -07:00
Edward Yang
6f06df8193 Fix lint (#37922)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37922

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D21426425

Pulled By: ezyang

fbshipit-source-id: 9d0d997f608a742668f64e7529c41feb39bec24e
2020-05-06 09:29:34 -07:00
Gregory Chanan
122d8215a3 [RESUBMIT] Kill broadcasting from the codegen layer. (#37907)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37907

Test Plan: Imported from OSS

Differential Revision: D21420872

Pulled By: gchanan

fbshipit-source-id: c782c0c438bcb7e764a97b446f8c3cd168e188f0
2020-05-06 08:54:47 -07:00
Jerry Ma
88c447bf71 Change DeprecationWarning to UserWarning in torch.cuda (#32142)
Summary:
Follow-up of https://github.com/pytorch/pytorch/issues/27361 .

Addresses https://github.com/pytorch/pytorch/issues/32141 .
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32142

Differential Revision: D19404540

Pulled By: gchanan

fbshipit-source-id: f0b230a3224004286064da2b617ff471ba272f47
2020-05-06 08:28:43 -07:00
Supriya Rao
f78d02ed51 [quant][tests] Enable tests to run on all qengine backends (#37843)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37843

Refactor tests to use supported_qengines

Test Plan:
python test/test_quantization.py

Imported from OSS

Differential Revision: D21409626

fbshipit-source-id: 21b23e498f4359c7ea7430c86f931dd534ddfdb7
2020-05-06 07:51:29 -07:00
Tal Cherckez
2f61b04514 Add Aten as dep to fakelowp and cpuinfo path to its include path (#37909)
Summary:
yinghai please review
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37909

Reviewed By: hyuen

Differential Revision: D21422399

Pulled By: yinghai

fbshipit-source-id: 2dfce909fe11a12404d16286e77e81dd46dfda52
2020-05-06 06:32:13 -07:00
Owen Anderson
75c201ac32 Fix some amount of support for Bool in tensorexpr. (#37914)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37914

Reviewed By: ZolotukhinM

Differential Revision: D21421402

Pulled By: resistor

fbshipit-source-id: 825391843d74fee3a23a934c859d867ef3cffde9
2020-05-06 02:04:48 -07:00
Pritam Damania
cdc56d0b6c Support c10::optional<Tensor> in custom C++ autograd function. (#37700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37700

Certain autograd functions can have optional Tensor arguments. For
this purpose it would be nice to support c10::optional<Tensor> as an argument
for C++ autograd functions.

I've added the appropriate overload to ExtractVariables to ensure this works.
For an example, you can look at D21272807 in terms of how this is used.
ghstack-source-id: 103541789

Test Plan: waitforbuildbot

Differential Revision: D21363491

fbshipit-source-id: 0c8665e9bfe279e6b9ab84a889524fea11fa971c
2020-05-06 01:59:51 -07:00
Gao, Xiang
b57b596f20 Reduction should not coalesce_dimensions when splitting for 32bit indexing (#37788)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/37583
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37788

Differential Revision: D21387325

Pulled By: ngimel

fbshipit-source-id: dbd0f5a23e06d8c4cc68cd21b09b4b0221c4bba7
2020-05-05 23:44:00 -07:00
svcscm
222fdd4227 Updating submodules
Summary:
GitHub commits:

8eb845b08d
40f530d566

Test Plan: n/a

Reviewed By: jurajh-fb

fbshipit-source-id: d73a0ab8a9ab28196e88b40bb31fe93bf20378ba
2020-05-05 23:36:49 -07:00
Jerry Zhang
ad2305e556 Revert D21393512: [quant][graphmode] Support a new category of ops in graph mode quantization
Test Plan: revert-hammer

Differential Revision:
D21393512

Original commit changeset: 5632935fe1a7

fbshipit-source-id: 6e43897ee59924656af18a7f2c95c13bb4b48311
2020-05-05 22:51:40 -07:00
Edward Yang
fe88806784 Back out "Revert D21171334: [pytorch][PR] Change StorageImpl to track byte count rather than element count" (#37893)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37893

Original commit changeset: 50746043acf3

Test Plan: sandcastle and ossci

Reviewed By: malfet, seemethere, ngimel

Differential Revision: D21416509

fbshipit-source-id: 735ec4e61f9d36d4537f52dd2dc6267751aeb94b
2020-05-05 22:43:15 -07:00
Mikhail Zolotukhin
8c91b78277 [TensorExpr] Fix the shape info check in the TE fuser pass. (#37882)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37882

Previously we checked if a node's inputs and outputs have shape
info only when we tried to merge this node into an existing fusion
group, but we didn't check it for the first node in the group. This PR
fixes that. It was causing a failure on test_milstm_cuda, which is now
fixed.

Test Plan: Imported from OSS

Reviewed By: Krovatkin

Differential Revision: D21412756

Pulled By: ZolotukhinM

fbshipit-source-id: 3ca30637ab8fe68443adb5fc03f1b8a11085a6a8
2020-05-05 22:34:59 -07:00
rohithkrn
e3934dfae8 [ROCm] Enable bfloat16 for ops in BERT model (#37634)
Summary:
Enables bfloat16 type for ops present in BERT model.
Enabled relevant unit tests.

ezyang jeffdaily
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37634

Differential Revision: D21413957

Pulled By: ezyang

fbshipit-source-id: 19309fe46b4a2f07922bf5b32fee2066df514aeb
2020-05-05 21:24:56 -07:00
ashishfarmer
402f635bbe Enable ahead of time compilation for HIPExtensions using ninja (#37800)
Summary:
This pull request enables ahead of time compilation of HIPExtensions with ninja by setting appropriate compilation flags for ROCm environment. Also, this enables the unit test for testing cuda_extensions on ROCm as well as removing test for ahead of time compilation of extensions with ninja from ROCM_BLACKLIST

ezyang jeffdaily
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37800

Differential Revision: D21408148

Pulled By: soumith

fbshipit-source-id: 146f4ffb3418f3534e6ce86805d3fe9c3eae84e1
2020-05-05 20:53:35 -07:00
Jerry Zhang
70f375becf [quant] ConvPackedParams with TorchBind (#35923)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35923

(Note: this ignores all push blocking failures!)

Test Plan:
tbd

Imported from OSS

Differential Revision: D20957089

fbshipit-source-id: 74d8bd628ccba64e902ea6ebabc2b883924050b0
2020-05-05 20:18:36 -07:00
Basil Hosmer
32b09f7ab9 Devirtualize device init calls in factory op wrappers (#37815)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37815

Generated device-specific wrappers for Tensor factory ops now call
methods on `globalContext()` directly, rather than indirecting
through `globalLegacyTypeDispatch()`, which we can now delete.

Test Plan: Imported from OSS

Differential Revision: D21398294

Pulled By: bhosmer

fbshipit-source-id: b37bc67aa33bfda6f156d441df55ada40e9b814d
2020-05-05 19:56:45 -07:00
Nikita Shulga
9f060d3873 [Caffe2] Increase timing threshold to 50 ms on Windows (#37892)
Summary:
Helps prevent following accidental failures:
```
..\caffe2\core\parallel_net_test.cc:303
The difference between ms and 350 is 41, which exceeds kTimeThreshold, where
ms evaluates to 391,
350 evaluates to 350, and
kTimeThreshold evaluates to 40.
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37892

Differential Revision: D21417251

Pulled By: malfet

fbshipit-source-id: 300cff7042e466f014850cc7cc406c725d5d0c04
2020-05-05 19:45:36 -07:00
Jerry Zhang
5eacc9cb57 [quant][graphmode] Support a new category of ops in graph mode quantization (#37515)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37515

Previously we classify ops like average pool to the category that doesn't require observation and
the quantization of these ops are done by swapping with dequantize ops: https://github.com/pytorch/pytorch/pull/33481
However, this operation is done in finalize, which means finalize is a numerics changing pass when we swap dequantize with
ops like average pool, this is not ideal since we want to restrict the scope of numerics changing passes.
Because although average pool doesn't require observation, quantized average pool = dequant + float32 average pool + quant
and swapping average pool with dequantize is a numerics changing operation.

This PR implements the support for that. We'll classify ops like average pool to a new category and we'll get average pool through fusion, like we did for other quantized ops. And the numerics changing pass will only happen in insert quant dequant pass, so the model will have the same numerics before and after finalize. With the new category, the debug only option(the model before finalize) for quantize_script will actually produce a model that's numerically consistent with the finalized model.

Test Plan:
python test/test_quantization.py TestQuantizeScriptJitPasses

Imported from OSS

Differential Revision: D21393512

fbshipit-source-id: 5632935fe1a7d76382fda22903d77586a08f0898
2020-05-05 19:04:53 -07:00
Edward Yang
480bd0ad50 Stop defining static data in Vec256 (#37767)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37767

Fixes #37577

Needs tests, and maybe a lint.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D21386704

Pulled By: ezyang

fbshipit-source-id: 082c69f9e1f40dc5ed7d371902a4c498f105d99f
2020-05-05 18:46:40 -07:00
Michael Ranieri
96b512be07 fix msan in vec_reduce_all (#37853)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37853

```
Uninitialized value was created by an allocation of 'acc_arr_next' in the stack frame of function '_ZN2at6vec25614vec_reduce_allIfZZNS_6native12_GLOBAL__N_124_vec_log_softmax_lastdimIfEEvPT_S6_llENKUlllE_clEllEUlRNS0_12_GLOBAL__N_16Vec256IfEESB_E_EES5_RKT0_NS9_IS5_EEl'
    #0 0xa961530 in float at::vec256::vec_reduce_all<float, void at::native::(anonymous namespace)::_vec_log_softmax_lastdim<float>(float*, float*, long, long)::'lambda'(long, long)::operator()(long, long) const::'lambda'(at::vec256::(anonymous namespace)::Vec256<float>&, at::vec256::(anonymous namespace)::Vec256<float>&)>(void at::native::(anonymous namespace)::_vec_log_softmax_lastdim<float>(float*, float*, long, long)::'lambda'(long, long)::operator()(long, long) const::'lambda'(at::vec256::(anonymous namespace)::Vec256<float>&, at::vec256::(anonymous namespace)::Vec256<float>&) const&, at::vec256::(anonymous namespace)::Vec256<float>, long) xplat/caffe2/aten/src/ATen/cpu/vec256/functional.h:12
```

Test Plan:
passed sanitizer locally after change,
CI green

Differential Revision: D21408120

fbshipit-source-id: b9d058cedf42b3d1d34ce05a42049d402906cd13
2020-05-05 18:25:15 -07:00
Ailing Zhang
e3d1c4eaac Revert D21310335: reenable quantization test_qadd_scalar_relu test
Test Plan: revert-hammer

Differential Revision:
D21310335

Original commit changeset: 99d22e61168f

fbshipit-source-id: 081b24ef0026ffb5fbb86d0654406b46e3d752eb
2020-05-05 18:02:15 -07:00
Nikolay Korovaiko
92f750b5c7 disable clang-tidy modernize-trailing-return (#37888)
Summary:
too much noise from this warning
![image](https://user-images.githubusercontent.com/5086322/81123764-b6e15900-8ee8-11ea-8f2f-49d69ddde25d.png)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37888

Differential Revision: D21415338

Pulled By: Krovatkin

fbshipit-source-id: 8d6f1be11d8419fa54a18e167929100401da439a
2020-05-05 17:40:22 -07:00
peter
0359a9b0a0 Delay loading the cuda library on Windows (#37811)
Summary:
so we can import torch compiled with cuda on a CPU-only machine.
need tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37811

Differential Revision: D21417082

Pulled By: ezyang

fbshipit-source-id: 7a521b651bca7cbe38269915bd1d1b1bb756b45b
2020-05-05 17:28:28 -07:00
Gregory Chanan
91c1505e5a Move addmm broadcasting code from codegen layer to native layer. (#37613)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37613

Test Plan: Imported from OSS

Differential Revision: D21337341

Pulled By: gchanan

fbshipit-source-id: 064e983e0dc4334c5eed9df1af57bd7fc29d7a81
2020-05-05 17:15:48 -07:00
Gregory Chanan
6792c3ad24 Move addbmm broadcasting from the codegen layer to native layer. (#37603)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37603

Test Plan: Imported from OSS

Differential Revision: D21333923

Pulled By: gchanan

fbshipit-source-id: 6afb8f7b9931fd78064b4c759d38ffb0f4a6e293
2020-05-05 17:13:16 -07:00
Edward Yang
b8d48d3680 Revert D21406034: [pytorch][PR] [BE] Add @skipIfNoFBGEMM decorator
Test Plan: revert-hammer

Differential Revision:
D21406034

Original commit changeset: 9583a8a726c2

fbshipit-source-id: ec891e5d00c78310b320f4901a261fc99fc5399b
2020-05-05 16:48:40 -07:00
Raghuraman Krishnamoorthi
34bf868ebc Fix weight quantization in RNNs (#35961)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35961

Weight quantization was done incorrectly for LSTMs, the statistics for all weights (across layers) were combined in the observer. This meant that weights for later layers in a LSTM would use sub-optimal scales impacting accuracy. The problem gets worse as the number of layers increases.
ghstack-source-id: 103511725

Test Plan: Will be updated

Differential Revision: D20842145

fbshipit-source-id: a622b012d393e0755970531583950b44f1964413
2020-05-05 16:40:16 -07:00
Edward Yang
a2fc7f787a Revert D21171334: [pytorch][PR] Change StorageImpl to track byte count rather than element count
Test Plan: revert-hammer

Differential Revision:
D21171334

Original commit changeset: 37329a379de9

fbshipit-source-id: 50746043acf3c76754688de0fe6f1cc12437ea2f
2020-05-05 16:36:15 -07:00
Michael Ranieri
563bbeb890 fix undef CUDA_VERSION warning (#37866)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37866

make sure not to check `CUDA_VERSION` if it is not defined

Test Plan: CI gree

Reviewed By: anjali411

Differential Revision: D21408844

fbshipit-source-id: 5a9afe372b3f1fbaf08a7c43fa3e0e654a569d5f
2020-05-05 16:31:24 -07:00
Vasiliy Kuznetsov
0cae718723 reenable quantization test_qadd_scalar_relu test (#37423)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37423

For now, see what breaks on CI
ghstack-source-id: 103508233

Test Plan:
CI

Imported from OSS

Differential Revision: D21310335

fbshipit-source-id: 99d22e61168fcb318b18a16522aabdc0115c1f39
2020-05-05 16:10:42 -07:00
Vasiliy Kuznetsov
b61fda2313 reenable quantized test_compare_tensor_scalar (#37422)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37422

The test was failing because in fbcode the version of hypothesis was too old to know
about the width parameter, and it was trying to generate values larger than float32.  The fix
is to explicitly set the defaults of the floats range for old versions of hypothesis.

For now, reenable the test and see what breaks in CI
ghstack-source-id: 103500358

Test Plan:
CI

```
buck test mode/dev-nosan //caffe2/test:quantization -- 'test_compare_tensor_scalar \(quantization\.test_quantized_op\.TestComparatorOps\)'
```

Imported from OSS

Reviewed By: raghuramank100

Differential Revision: D21310336

fbshipit-source-id: 1a59ab722daa28aab3d6d2d09bc527874942dc36
2020-05-05 16:09:08 -07:00
Michael Ranieri
b57d82fcbb workaround nvcc host function bug (#37867)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37867

this is to work around internal issue we are hitting with nvcc in ovrsource.
It does not seem to overload to the correct device version of `isinf` and `isnan` without this fudging of the code.

Test Plan:
CI green,
internal builds pass

Reviewed By: malfet

Differential Revision: D21408263

fbshipit-source-id: 1ff44e088b5c885d729cc95f00cf8fa07e525f6d
2020-05-05 15:31:34 -07:00
Omkar Salpekar
30a65f1afa [Tensorpipe Agent] Call Shutdown from Destructor and Join (#37839)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37839

Calling `RpcAgent::shutdown` from the TensorpipeAgent will ensure that parent class threads are joined and the atomic is set to False.
ghstack-source-id: 103496383

Test Plan: CI Build - no Tensorpipe Agent tests yet

Differential Revision: D21291974

fbshipit-source-id: 50cab929b021faf7f80e0e8139d0c7d1788a3a6c
2020-05-05 15:25:45 -07:00
Hong Xu
5325606c37 Add zero_mask() for Vec256<BFloat16> (#37114)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37114

Test Plan: Imported from OSS

Differential Revision: D21351861

Pulled By: VitalyFedyunin

fbshipit-source-id: 4564624cb33555a3f026af25540b2df24edaecfb
2020-05-05 15:14:42 -07:00
Nikita Shulga
4c009c7f3e Make aten_tensor_iterator ASAN safe (#37869)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37869

Return type of `cpu_serial_kernel` functor should match type of the Tensor
Closes https://github.com/pytorch/pytorch/issues/37490

Test Plan: CI

Differential Revision: D21410450

fbshipit-source-id: 78081d7478fc8126cbd497625ba60ed17e253314
2020-05-05 15:08:48 -07:00