Commit Graph

18149 Commits

Author SHA1 Message Date
cf7ef5e631 Add onnxifi support for Int8FCDNNLowPPackedWeightBlob (#20564)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20564

Reviewed By: bddppq

Differential Revision: D15106712

fbshipit-source-id: 428db9c23cfd36ddedc8d79121fbbb3bb484c993
2019-05-20 16:57:11 -07:00
0bfc0eeef7 restore hidden visibility by default for Linux builds (#20461)
Summary:
Symbols are given hidden visibility by default on Linux to emulate the behavior on Windows.  This helps developers catch visibility issues in their streamlined Linux dev environment before being surprised, late in the process, by Windows errors.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20461

Reviewed By: kostmo

Differential Revision: D15410410

Pulled By: dzhulgakov

fbshipit-source-id: 1d684b5a9a80b692966a775c3f1c56b7c72ffc95
2019-05-20 16:49:37 -07:00
be1f83c350 Fix dll linkage for tensor type ids (#20547)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20547

-

Differential Revision: D15359988

fbshipit-source-id: 680115a6b73f64c9b02f86eccb8feb799adc6c90
2019-05-20 16:25:09 -07:00
410c7210db Add save() to torch._C.Function (#20386)
Summary:
Fixes #20017

This wraps the `torch._C.Function` currently returned from `torch.jit.script` and `torch.jit.trace` in a `ScriptFunction` and `TracedFunction` respectively, both of which are just wrappers to hold the function.
](https://our.intern.facebook.com/intern/diff/15403161/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20386

Pulled By: driazati

Differential Revision: D15403161

fbshipit-source-id: 94fb9f32929e62a00be6cf7512ea144ec9b91e0b
2019-05-20 16:19:51 -07:00
987f1ccf49 Add "ndim" property to tensor (#20565)
Summary:
For compatibility with numpy.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20565

Differential Revision: D15374390

Pulled By: umanwizard

fbshipit-source-id: 4ab209a5fb27d8ba27ee7eb6b67b858ce2480594
2019-05-20 16:10:50 -07:00
6ae99aa5bc onnx/caffe2 tests: Do not execute models with CPU-only operators on GPU.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20720

Reviewed By: bddppq

Differential Revision: D15422322

Pulled By: houseroad

fbshipit-source-id: c79795434157ff5f0a7b2774fd40edc71cf35ba7
2019-05-20 16:04:45 -07:00
be33434d85 Unify the addQuantDequantNode api for inputs and outputs from quant nodes (#20677)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20677

With new changes in IR, it is possible to insert nodes after param
nodes in graph. Thus we do not need to have two methods for inserting q-dq
nodes to input or output to quantizable nodes.

Differential Revision: D15406354

fbshipit-source-id: 1963762f434fd82877fa76a272e8520c342b6069
2019-05-20 15:27:45 -07:00
cf548ba683 De-deprecate old list and dict APIs (#20709)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20709

- Remove ArrayRef based API. This is neither the old nor the planned new API.
- De-deprecate kernels based on std::vector and std::unordered_map. We don't have the Dict/List based API figured out entirely yet, so we shouldn't push people towards using them.
  std::vector and std::unordered_map will get deprecated again once we figured out List/Dict.

Reviewed By: dzhulgakov

Differential Revision: D15417025

fbshipit-source-id: bfbb33c762e43487bb499bc8cc36d515e678f8fc
2019-05-20 13:53:00 -07:00
c062175803 Remove unused var (ws_) and use vars in undefined case for compile (#20667)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20667

Compilation errors:
```
xplat/caffe2/caffe2/utils/signal_handler.h:31:10: error: private field 'SIGINT_action_' is not used [-Werror,-Wunused-private-field]
  Action SIGINT_action_;
         ^
xplat/caffe2/caffe2/utils/signal_handler.h:32:10: error: private field 'SIGHUP_action_' is not used [-Werror,-Wunused-private-field]
  Action SIGHUP_action_;
         ^
xplat/caffe2/caffe2/utils/signal_handler.h:33:17: error: private field 'my_sigint_count_' is not used [-Werror,-Wunused-private-field]
  unsigned long my_sigint_count_;
                ^
xplat/caffe2/caffe2/utils/signal_handler.h:34:17: error: private field 'my_sighup_count_' is not used [-Werror,-Wunused-private-field]
  unsigned long my_sighup_count_;
                ^
4 errors generated.

xplat/caffe2/caffe2/share/fb/stylizer/median_blur_ops.cc:593:14: error: private field 'ws_' is not used [-Werror,-Wunused-private-field]
  Workspace* ws_;
             ^
1 error generated.
```

Reviewed By: bwasti

Differential Revision: D15402928

fbshipit-source-id: 5b98499850aa659fd37ab8e7f2e75166787b8129
2019-05-20 13:52:57 -07:00
af6eea9391 Add the support of feature store example in pytorch model in fblearner (#20040)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20040

Add the support of feature store example in fblearner pytorch predictor, end to end

Reviewed By: dzhulgakov

Differential Revision: D15177897

fbshipit-source-id: 0f6df8b064eb9844fc9ddae61e978d6574c22916
2019-05-20 12:58:27 -07:00
9fbce974c9 torch::jit::RegisterOperators forwards to c10::RegisterOperators
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20383

Reviewed By: zdevito

Differential Revision: D15300937

fbshipit-source-id: 740fe323fc0945759651116ae61aff4d36319d73
2019-05-20 12:41:04 -07:00
74bdcd44c4 Remove tab. (#20715)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20715
ghimport-source-id: 600e244581b37152d86614cca6c9fb5fee6cdcde

Differential Revision: D15417984

Pulled By: ezyang

fbshipit-source-id: 939425de1a95ecc3798384e121b12faaba3a27b8
2019-05-20 11:57:18 -07:00
10445c0404 Finish removal of AT_CHECK, officially deprecate the macro. (#20600)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20600

All future uses of AT_CHECK will fail our CI.

Reviewed By: jerryzh168

Differential Revision: D15375397

fbshipit-source-id: 5582664d6c7c4f1a56ae45647eb1bca49fed2866
2019-05-20 11:57:15 -07:00
c1fa449763 Break reference cycle in load_state_dict (#20397)
Summary:
load_state_dict includes a recursive inner function `load` that captures
Tensors through the close-over variable `state_dict`. Because it's
recursive, it also captures itself leading to a reference cycle.

This breaks the reference cycle so that any Tensors in state_dict can be
collected immediately instead of waiting until the next GC cycle.

Alternatively, we could have passed `state_dict` and `metadata` as
arguments to load to prevent capture of Tensors. (That would still
result in cyclic garbage, but not any cyclic garbage of Tensors).

See:
https://github.com/pytorch/pytorch/issues/20199#issuecomment-491089004
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20397

Differential Revision: D15414834

Pulled By: colesbury

fbshipit-source-id: 4c2275a08b2d8043deb3779db28be03bda15872d
2019-05-20 11:46:00 -07:00
796e359601 Refactor builtin ops
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20666

Pulled By: driazati

Differential Revision: D15404419

fbshipit-source-id: c52bfa408c3caabb0a14779308686cf27fed349b
2019-05-20 11:21:18 -07:00
c0a2a3b22b Add a new method SummaryWriter.flush() (#20607)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20607

Add a new method SummaryWriter.flush()  that iterates through all of the FileWriters and flushes them

Reviewed By: orionr

Differential Revision: D15380124

fbshipit-source-id: 1975f3f61c5ae3754552bfdb23f2cd78f687d19f
2019-05-20 11:05:12 -07:00
f215db9b92 InsertGuards pass
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20438

Differential Revision: D15342655

Pulled By: Krovatkin

fbshipit-source-id: a193e582d621b99f848573fb4478e7b62265dc9f
2019-05-20 10:49:19 -07:00
036a159fb9 Audit AT_ASSERT sites in TensorImpl.h; doc improvements (#20649)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20649

I went through every occurrence of AT_ASSERT in this file and
thought about whether or not it should be TORCH_INTERNAL_ASSERT
or TORCH_CHECK.  I think I did a good job at it.  Some thoughts:

- In order to decide if a check is "internal" or not, we must
  think about where the separation between userspace and our internals
  are.  I think any code that utilizes the PyTorch or Caffe2 C++ frontends
  count as userspace.  An important collorary is that the majority of operator
  code "counts" as userspace, even though it lives in our repository.  This
  is inline with TCB (trusted computing base) thinking: you want the TCB to
  be as small as possible, and because we have a *lot* of operator
  implementations, they should not count as TCB.

- The primary test I applied when considering an AT_ASSERT was whether or
  not I could trigger this error by just making method calls on caffe2::Tensor
  or at::Tensor.  If I could, that made it a TORCH_CHECK.  This covers most
  of the misapplications of TORCH_INTERNAL_ASSERT.  One place I didn't
  do this was the "is variable" checks; I think you have to work a bit
  harder to trigger this case, and userspace code is not mixing up
  Variables and Tensros.

- I updated the docs for device_opt_, explaining when it could be nullopt.
  (The nullopt checks here are TORCH_CHECK, because you can trigger them
  by taking an undefined tensor and poking the methods.)

Differential Revision: D15395576

fbshipit-source-id: 1c51b396012e7d949fbb4258092cf80e5e6f851b
2019-05-20 09:54:37 -07:00
71260b98e2 Fixed histc return type for CUDA (#20369)
Summary:
Fixing reported [issue](https://github.com/pytorch/pytorch/issues/20208).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20369

Reviewed By: zou3519

Differential Revision: D15300959

Pulled By: izdeby

fbshipit-source-id: 219692f99a66ea433112dfc226132eb6867122cf
2019-05-20 08:08:28 -07:00
d0c742134d #20028 (#20696)
Summary:
Hi, ezyang
Sorry to trouble you.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20696

Differential Revision: D15413694

Pulled By: ezyang

fbshipit-source-id: 1c19d18e00c3a66a52bb9230aa25d7530f6e659c
2019-05-20 07:51:55 -07:00
cda9e995e2 Benchmark repeat op. (#20016)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20016

PT's repeat op benchmark

Reviewed By: zheng-xq

Differential Revision: D15166941

fbshipit-source-id: b1ed7af790460456210b60bfb4e44a08657e9612
2019-05-20 07:34:54 -07:00
8acaa286b7 Make CUDACachingAllocator::recordStream() a no-op on null ptrs (#20658)
Summary:
Fixes #20651

Communication collectives in `torch.distributed` call `CUDACachingAllocator::recordStream()` on input and output tensors to prevent their memory blocks being freed too early. `CUDACachingAllocator` uses tensor's data pointer to track memory blocks, which does not accept null pointers. However, empty tensor's `storage().data()` might be null. In this case, as there is no associated memory block for the empty tensor, it should be fine to make `recordStream()` a no-op.

Tests only cover `broadcast` empty tensors for GLOO backend, because GLOO does not support empty inputs (facebookincubator/gloo/issues/179). It can be addressed in either `ProcessGroupGloo` or GLOO itself. Will add more tests when that gap is filled.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20658

Differential Revision: D15399371

Pulled By: mrshenli

fbshipit-source-id: d29ebd1c72fddae49531f32695f81b89e42e5a4d
2019-05-20 07:13:51 -07:00
071971476d Fix Binomimal overflow when logits is large (#20679)
Summary:
This PR fixes  #17843. In addition (test locally), this still maintains the continuity of log_prob which is addressed in https://github.com/pytorch/pytorch/pull/15962

cc neerajprad
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20679

Differential Revision: D15413311

Pulled By: ezyang

fbshipit-source-id: 4fc0ca755ae6a85aa7deb2206dab675f82f9aa25
2019-05-20 06:52:29 -07:00
9b1dbffba5 Re-sync with internal repository (#20702) 2019-05-20 09:22:57 -04:00
5835165ce3 Add get/set_num_interop_threads into torch.h include (#20659)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20659
ghimport-source-id: 4858d03a9f89c613f64901c3430a7b212f76eb95

Reviewed By: dzhulgakov

Differential Revision: D15399780

Pulled By: ilia-cher

fbshipit-source-id: c1c3cb628c5ee664468f9d181bcd76a5105a89fd
2019-05-20 00:34:59 -07:00
4598729399 better handling of getenv 2019-05-19 23:19:52 -07:00
d3059b9c49 Lightweight logging for once-only API usage 2019-05-19 23:04:40 -07:00
7b9ee598d6 separate option for FE_OVERFLOW (#20476)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20476

There're overflow exceptions happening for legitimate computation like
for big x, sigmoid(x) = 1 / (1 + exp(-x)) = 1 / (1 + inf) = 1
This diff separates the option for FE_OVERFLOW to make caffe2_operator_throw_if_fp_exceptions=1 option less noisy.

Reviewed By: hx89

Differential Revision: D15332947

fbshipit-source-id: 9148233f5b84551a0900f0557ba22f2b1508ae0c
2019-05-19 16:05:27 -07:00
dd050b7b91 Replace AT_ASSERT with TORCH_INTERNAL_ASSERT/TORCH_CHECK (#20668)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20668

AT_ASSERT is deprecated. Replace it wil the new exception handling macro.

Differential Revision: D15404401

fbshipit-source-id: 7ae9f5471f1f8ad95e7bb835380e098c00313d9c
2019-05-18 01:48:11 -07:00
96a1f7695f Support plot norm of specific embeddings of a LUT in diagnose_options (#19809)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19809

as title

Reviewed By: chocjy

Differential Revision: D15100505

fbshipit-source-id: cba290fd4317b260e2bf1689b9ca215d3d19a9e2
2019-05-18 01:08:45 -07:00
2308257483 delete brodcasting ops from shape analysis resize aliasing (#20661)
Summary:
According to https://pytorch.org/docs/stable/notes/broadcasting.html, in-place operations do not allow the in-place tensor to change shape as a result of the broadcast. Therefore our shape analysis could keep the shape information on inputs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20661

Differential Revision: D15406477

Pulled By: wanchaol

fbshipit-source-id: 8ab60e783292f2fe26e5fdecfb64bec43bca6826
2019-05-18 00:07:32 -07:00
e74869473d De-deprecate parts of the legacy API (#20561)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20561

We previously planned to deprecate the direct passing of a kernel function or lambda to the op() call, e.g.

    static auto registry = RegisterOperators().op("my::op", &func);

and push users towards the options based API:

    static auto registry = RegisterOperators().op("my::op", RegisterOperators::options().kernel<decltype(func), &func>());

because that has a slightly lower performance overhead when calling the kernel.

However, that overhead is negligible for all but exotic use cases, so there's no reason to push users towards a more verbose API.
This diff removes the deprecation warning from that API.

However, if you use the API together with deprecated types like std::unordered_map, you will now get a deprecation warning there.

Reviewed By: zdevito

Differential Revision: D15364271

fbshipit-source-id: 56dae0c5870bbab16ad19ba5178f4bea9eafed9f
2019-05-17 20:54:45 -07:00
cb6be42403 Options based registration API (#20514)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20514

Change API from

    static auto registry = c10::RegisterOperators()
      .op("my::op",
        c10::kernel(...),
        c10::dispatchKey(...)
      );

to

    static auto registry = c10::RegisterOperators()
      .op("my::op", c10::RegisterOperators::options()
        .kernel(...)
        .dispatchKey(...)
      );

because this allows better discoverability. People looking for which options are available will easier find it and IDE autocompletion will work better.

Reviewed By: zdevito

Differential Revision: D15346348

fbshipit-source-id: 4b74a33b75c2b9cda4a903639fb7abd2c7cff167
2019-05-17 20:54:42 -07:00
85fad0597c Add qint8 type (int8_t) (#19984)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19984

Add qint8 for QTensor, with underlying type of int8_t

Reviewed By: jianyuh

Differential Revision: D15150715

fbshipit-source-id: 57580f599d46f9323af5ce462dbbc464b25e40d7
2019-05-17 20:35:05 -07:00
986c9eb537 Add a pybind for Module::get_functions. (#20594)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20594
ghimport-source-id: 96f8046fd3aed49d8b29312ce2f8d7e0ea5e5787

Differential Revision: D15375132

Pulled By: ZolotukhinM

fbshipit-source-id: 7ad87e29d965e459c49be1be8a08f86ed2a0b4db
2019-05-17 20:00:28 -07:00
2af5911a95 Modify the Insert quant-dequant test cases to look for q-dq pattern (#20672)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20672

Current test case looks for q->int_repr->dq pattern and constant nodes also.
The prim::Constant nodes are not guaranteed to be present at same point in graph.
So we modify the test case to only look for the q->int_repr->dq nodes.

Differential Revision: D15405606

fbshipit-source-id: 2086ffb5bbd328d2a9a55f4c2a2de342575194d3
2019-05-17 18:46:27 -07:00
e42665cf39 Some small performance fixes for c10 dispatcher (#20472)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20472
ghimport-source-id: d118bf8d48eea3faf241a7288fcad1bb6a5f051f

Differential Revision: D15332284

Pulled By: li-roy

fbshipit-source-id: a8d9e50a440a7ad3ee730f70c0fcae06ae848cbd
2019-05-17 17:35:56 -07:00
d9dcfacd9e Improve CPUAllocator OOM message (#20618)
Summary:
Spotted while debugging some problem

Before
```
>>> torch.empty(10**15)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: [enforce fail at CPUAllocator.cpp:56] posix_memalign(&data, gAlignment, nbytes) == 0. 12 vs 0
```

After
```
>>> torch.empty(10**15)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: [enforce fail at CPUAllocator.cpp:65] . DefaultCPUAllocator: can't allocate memory: you tried to allocate 4000000000000000 bytes. Error code 12 (Cannot allocate memory)
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20618

Reviewed By: ezyang

Differential Revision: D15390400

Pulled By: dzhulgakov

fbshipit-source-id: 31f448303e4bd5f8c2bad8ca0f05bcece22a4b5e
2019-05-17 16:14:49 -07:00
e79610c0df Fix missing env for update_binary_size job
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20645

Differential Revision: D15400130

Pulled By: pjh5

fbshipit-source-id: d2a07fc5608ab3a96026b60e16bd12add8e0c9d4
2019-05-17 15:46:50 -07:00
c267d0c869 Misc error message improvements (#19369)
Summary:
Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#19369 [jit] Misc error message improvements**
)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19369

Pulled By: driazati

Differential Revision: D14982975

fbshipit-source-id: 18dae3d56c3a01280f66223a69e2e52d15d3b651
2019-05-17 15:30:58 -07:00
3be2f7c8e6 SubgraphMatcher: add attributes support. (#20602)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20602
ghimport-source-id: fa3225bb5d70729d6a1bcf88295d031707d986a1

Differential Revision: D15377635

Pulled By: ZolotukhinM

fbshipit-source-id: ebd385e7b9436429d0ad76ed3d932925a29f6456
2019-05-17 15:10:02 -07:00
0b9b929d14 Use python type string for user facing error msgs (#20657)
Summary:
Otherwise users see something like (Tensor, Tensor)? and don't know what the ? means.

First commit is formatting.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20657

Differential Revision: D15400225

Pulled By: eellison

fbshipit-source-id: cf826790bf2ddafd34f6d5c144526cad9904770b
2019-05-17 15:04:53 -07:00
c819d76789 Add list(string) (#20617)
Summary:
Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#20617 [jit] Add list(string)**

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

Pulled By: driazati

Differential Revision: D15397739

fbshipit-source-id: 55a1e54f0ed2d9fd3ce44a8bb64bb4ba63181c9a
2019-05-17 14:57:20 -07:00
a543586bff Add _enable_recursive_script to try to script all Python functions (#19578)
Summary:
Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#19578 [jit] Try to script all Python functions**

This adds the `torch.jit._enable_recursive_script` context manager, which will try to compile any Python functions it sees. It's hidden behind an internal context manager for now since it's incomplete (doesn't work for script_methods/Python submodules). If it can't compile the Python function it outputs an error.
](https://our.intern.facebook.com/intern/diff/15386727/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19578

Pulled By: driazati

Differential Revision: D15386727

fbshipit-source-id: 4e308f67677b8e9fccfc525a91bb2f4585062048
2019-05-17 14:50:45 -07:00
cd28ff5395 Add support for __getstate__/__setstate__ on module (#20242)
Summary:
Adds support for `__getstate__` and `__setstate__` on modules that are called as part of export (`torch.save()`) and import (`torch.jit.load`).
* `__getstate__` and `__setstate__` must be TorchScript functions with the signatures `() -> T` and `(T) -> None` respectively
* The results of `__getstate__` are stored using the pickler in `states.pkl` with one for each module in definition order (`__getstate__` returns `None` by default if an imlpementation is not provided)
    * This prevents sharing between `__getstate__` and attributes, but this should be fine since their use is mostly unrelated (attributes are for storing values to be used in script methods, `__getstate__` for running arbitrary computations during import)

Follow up
* Somehow replacing `__getstate__`/`__setstate__` with a `ScriptMethodStub` makes `MyScriptModule().__getstate__()` call `ScriptModule.__getstate__()` when used in Python. This should be fixed so semantics in Python are preserved, but it doesn't affect the typical usage.
](https://our.intern.facebook.com/intern/diff/15287161/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20242

Pulled By: driazati

Differential Revision: D15287161

fbshipit-source-id: b3f5f33ab74a21a89e6d15460af63aff75cab2d8
2019-05-17 14:43:14 -07:00
5f14ef8cc1 Split out gpu/cpu targets based on gpu_library_targets (#20633)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20633

Merge the c2_gpu and is_amd_build logic in targets files.

Reviewed By: dzhulgakov

Differential Revision: D15176621

fbshipit-source-id: 9185b394ffcb305fd8d94dc7c7c92780bf10a511
2019-05-17 13:07:10 -07:00
79c5dc313c Remove unnecessary format literals from error message.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20646

Differential Revision: D15394795

fbshipit-source-id: 8033cf03341244b2b6a119e3c59f48ee6fe959cc
2019-05-17 10:45:40 -07:00
26dfeffacd Remove TH/THC link for single matrix inverse (#20534)
Summary:
- Earlier, we had to use the legacy implementation of `getri` for single matrix inverse from TH and THC
- Now, this has been moved to ATen

Changelog:
- Move single matrix inverse implementation to ATen
- Remove unused code in TH and THC resulting from the change
- Minor modifications made to single matrix CPU function implementations in ATen to avoid redundancy
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20534

Differential Revision: D15393383

Pulled By: ezyang

fbshipit-source-id: 81972111cd9757d15f1d634f294c93fd0f35636c
2019-05-17 10:03:36 -07:00
839a69f587 Revert D15393514: [pytorch][PR] Refine CosineAnnealingWarmRestarts doc for issue #20028
Differential Revision:
D15393514

Original commit changeset: 03f270a577fc

fbshipit-source-id: 3633f4e9916bdadf018288a64df89078b14af563
2019-05-17 09:55:56 -07:00
8c9f4c560a Add matmul optimization for the case A.ndim <= 2 && B.ndim >= 3 (#20448)
Summary:
This addresses #18862.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20448

Differential Revision: D15393465

Pulled By: ezyang

fbshipit-source-id: 87e5b0ed8253ea00365f420d98ac96dd4e934028
2019-05-17 09:44:26 -07:00