Commit Graph

2977 Commits

Author SHA1 Message Date
PyTorch MergeBot
0c7ca2d97b Revert "Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack (#82867)"
This reverts commit de0e03001d.

Reverted https://github.com/pytorch/pytorch/pull/82867 on behalf of https://github.com/kit1980 due to DLPack 0.7 is in conflict with the current usage of DLPack 0.6 internally
2022-08-07 20:38:29 +00:00
johnlu
de0e03001d Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack (#82867)
## Motivation
The DLPack device type kDLOneAPI stands for the Unified Shared Memory allocated on a oneAPI device. The corresponding Pytorch backend type is XPU.
Support to export/import the Pytorch XPU tensor as a DLPack tensor of kDLOneAPI device.

## Solution
1. Update the DLPack protocol to v0.7.
2. Add the XPU hooks to map the Aten device and DLPack device with the address value and device information.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82867
Approved by: https://github.com/kit1980
2022-08-05 06:41:42 +00:00
PyTorch MergeBot
0e16340f92 Revert "Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack. (#81021)"
This reverts commit 8be853025c.

Reverted https://github.com/pytorch/pytorch/pull/81021 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally
2022-08-05 01:51:39 +00:00
johnlu
8be853025c Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack. (#81021)
## Motivation
The DLPack device type kDLOneAPI stands for the Unified Shared Memory allocated on a oneAPI device. The corresponding Pytorch backend type is XPU.
Support to export/import the Pytorch XPU tensor as a DLPack tensor of kDLOneAPI device.

## Solution
1. Update the DLPack protocol to v0.7.
2. Add the XPU hooks to map the Aten device and DLPack device with the address value and device information.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/81021
Approved by: https://github.com/ezyang
2022-08-04 12:50:49 +00:00
Will Constable
4f34cd6d1e Replace all CHECK_ and DCHECK_ with TORCH_* macros (#82032)
Avoid exposing defines that conflict with google logging, since this blocks external usage of libtorch in certain cases.

All the 'interesting' changes should be in these two files, and the rest should just be mechanical changes via sed.
c10/util/logging_is_not_google_glog.h
c10/util/logging_is_google_glog.h

Fixes https://github.com/pytorch/pytorch/issues/81415

cc @miladm @malfet
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82032
Approved by: https://github.com/soumith, https://github.com/miladm
2022-07-26 01:20:44 +00:00
zhang, xiaobing
86b86202b5 fix torch.config can't respect USE_MKLDNN flag issue (#75001)
Fixes https://github.com/pytorch/pytorch/issues/74949, which reports that torch.config can't respect USE_MKLDNN flag.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75001
Approved by: https://github.com/malfet
2022-07-17 15:00:48 +00:00
Tim Gates
3a87b47de9 docs: Fix a few typos (#81435)
There are small typos in:
- caffe2/python/recurrent.py
- test/distributed/test_c10d_nccl.py
- test/test_fx.py
- torch/csrc/jit/runtime/autodiff.cpp
- torchgen/gen.py

Fixes:
- Should read `propagation` rather than `propogation`.
- Should read `multiplied` rather than `multuplied`.
- Should read `eliminate` rather than `elminate`.
- Should read `dispatcher` rather than `disaptcher`.

Semi-automated pull request generated by
https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81435
Approved by: https://github.com/ngimel
2022-07-14 04:20:26 +00:00
PyTorch MergeBot
877180e1af Revert "Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack. (#78154)"
This reverts commit 3a6c1dc7c7.

Reverted https://github.com/pytorch/pytorch/pull/78154 on behalf of https://github.com/albanD due to breaks mobile build
2022-07-05 08:52:46 +00:00
johnlu
3a6c1dc7c7 Add DLPack support for XPU backend by mapping to kDLOneAPI in DLPack. (#78154)
## Motivation
The DLPack device type kDLOneAPI stands for the Unified Shared Memory allocated on a oneAPI device. The corresponding Pytorch backend type is XPU.
Support to export/import the Pytorch XPU tensor as a DLPack tensor of kDLOneAPI device.

## Solution
1. Update the DLPack protocol to v0.7.
2. Add the XPU hooks to map the Aten device and DLPack device with the address value and device information.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/78154
Approved by: https://github.com/ezyang
2022-07-04 19:59:05 +00:00
Justin Chu
438142a599 [ONNX] Update onnx submodule to 1.12 (#79585)
Update onnx submodule to the 1.12 release
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79585
Approved by: https://github.com/garymm, https://github.com/msaroufim
2022-06-23 18:09:07 +00:00
Adam Simpkins
bb7fd1fcfb [caffe2] fix type annotations for workspace.SwitchWorkspace() (#77464)
Summary: The `create_if_missing` parameter is optional, and defaults to `None`.

Test Plan:
Confirmed that Pyre no longer complains about calling `SwitchWorkspace` with a
single string argument.

Differential Revision: D36366987

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77464
Approved by: https://github.com/voznesenskym
2022-05-20 19:22:06 +00:00
BowenBao
679fc90cdb [ONNX] Support optional type (#68793) (#73284)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73284

Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D34625646

Pulled By: malfet

fbshipit-source-id: 537fcbc1e9d87686cc61f5bd66a997e99cec287b

Co-authored-by: BowenBao <bowbao@microsoft.com>
Co-authored-by: neginraoof <neginmr@utexas.edu>
Co-authored-by: Nikita Shulga <nshulga@fb.com>
(cherry picked from commit 822e79f31ae54d73407f34f166b654f4ba115ea5)
2022-05-04 20:24:30 +00:00
Thiago Crepaldi
e07134092f Add warning when importing caffe2 on build without BUILD_CAFFE2=1
Confusing backtraces are issued to users when they run Caffe2 scripts (or tests) on PyTorch builds without Caffe2 enabled through `BUILD_CAFFE2=1`

This PR adds warnings (in more than one place) to return a friendly message for the user, helping them to overcome the problem by themselves

Pull Request resolved: https://github.com/pytorch/pytorch/pull/73770
Approved by: https://github.com/BowenBao, https://github.com/malfet, https://github.com/garymm
2022-04-21 12:28:10 +00:00
PyTorch MergeBot
cc1902a5ed Revert "Add warning when importing caffe2 on build without BUILD_CAFFE2=1"
This reverts commit b142a224c6.

Reverted https://github.com/pytorch/pytorch/pull/73770 on behalf of https://github.com/suo
2022-04-15 01:39:39 +00:00
Thiago Crepaldi
9bbe1d632e Fix ONNX ATen fallback for non-caffe2 engines
This PR introduces 3 BC changes:

First, this PR propagates `BUILD_CAFFE2` flag to `libtorch` and `libtorch_python`, which is necessary for non-caffe2 ONNX runtimes when using `ONNX_ATEN_FALLBACK` operator export type.

Second, as a complement of https://github.com/pytorch/pytorch/pull/68490, this PR refactors Caffe2's Aten ops symbolics to consider not only the `operator_export_type` (aka `ONNX_ATEN_FALLBACK`) to emit Caffe2 Aten ops, but also whether `BUILD_CAFFE2` (which is called `torch.onnx._CAFFE2_ATEN_FALLBACK` in python binding) is set.

Lastly, it renames `onnx::ATen` to `aten::ATen` for ONNX spec consistency in a BC fashion.
ONNX doesn't have `ATen` op on its spec, but PyTorch ONNX converter emits them. Non-Caffe2 backend engines would be mislead by such operator's name/domain. A non-ideal workaround would be to have Aten ops handled based on its name and ignore the (non-complaint) domain. Moreover, users could incorrectly file bugs to either ONNX or ONNX Runtime when they inspect the model and notice the presence of an unspecified ONNX operator.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73954
Approved by: https://github.com/BowenBao, https://github.com/malfet, https://github.com/garymm, https://github.com/jiafatom
2022-04-14 23:18:45 +00:00
Thiago Crepaldi
b142a224c6 Add warning when importing caffe2 on build without BUILD_CAFFE2=1
Confusing backtraces are issues to user when they try to run tests or actual scripts using Caffe2 on a pytorch build without Caffe2 enabled through BUILD_CAFFE2=1

This PR adds a warning in more than one place to return a friendly message for the user

Pull Request resolved: https://github.com/pytorch/pytorch/pull/73770
Approved by: https://github.com/BowenBao, https://github.com/malfet, https://github.com/garymm
2022-04-14 23:13:40 +00:00
Thiago Crepaldi
950dc1b457 Fix use of ONNX optimizer by Caffe2 backend
Fixes https://github.com/pytorch/pytorch/issues/69674

The fix is Back Compatible with any Caffe2 build. It simply tries to use `onnxptimizer` module when `onnx.optimizer` is not available.

`onnx.optimizer` does not exist since ONNX 1.9 (April 2021) as the code was moved to a different [repo](https://github.com/onnx/onnxoptimizer)

If both `onnx<1.9` and `onnxoptimizer` are not found, the current fallback behavior is maintained (no ONNX optimization happens). Otherwise, the ONNX optimization pass will run from whatever module it is found.

This PR does not require or enforce a direct package dependency to work
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75718
Approved by: https://github.com/BowenBao, https://github.com/malfet
2022-04-14 21:48:48 +00:00
John Shahid
4766314de1 Disable GPU tests for the PiecewiseLinearTransform operator. (#75738)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75738

The tests are failing on platform010 and blocking the upgrade.  Skip the tests given that Caffe2 on GPU is no longer supported.

Test Plan: signals

Reviewed By: ezyang

Differential Revision: D35613544

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75771
Approved by: https://github.com/jamesr66a
2022-04-14 12:07:50 +00:00
John Shahid
b311f255d8 Disable GPU tests for the Dropout operator. (#75739)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75739

The tests are failing on platform010 and blocking the upgrade.  Skip the tests given that Caffe2 on GPU is no longer supported.

Test Plan: signals

Reviewed By: ezyang

Differential Revision: D35614159

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75767
Approved by: https://github.com/ezyang
2022-04-14 05:43:41 +00:00
Yulv-git
ac2d2e3a3d Fix some typos.
Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75561
Approved by: https://github.com/albanD
2022-04-11 21:55:59 +00:00
Nikita Shulga
6d85e7dafa Fix sign-compare in caffe2
Prerequisite change for enabling `-Werror=sign-compare` across PyTorch repo

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

Approved by: https://github.com/ngimel
2022-04-05 00:08:05 +00:00
Tongliang Liao
198d727d01 Remove trailing semicolon. (#74031)
Summary:
Resolve https://github.com/pytorch/pytorch/pull/24388#discussion_r823210924

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

Reviewed By: ezyang

Differential Revision: D34820695

Pulled By: soulitzer

fbshipit-source-id: a42ff3a98aae25bda37680b6e1a8d5d6f0468ba4
(cherry picked from commit d428b4f2f8a2af18561e45fecc6617bbc023b68e)
2022-03-13 16:25:42 +00:00
Tongliang Liao
adae0d35d2 RNN args renaming in memonger.
RNN ops may contains link_internal/link_external and alias_src/alias_dst.
They should be renamed together with input/output blobs.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/24388
Approved by: https://github.com/ezyang
2022-03-09 20:21:33 +00:00
Wei Wei
bd3db019a0 Update fbcode symlinks for mkl-dnn ideep 2.5.2
Summary: as titled

Test Plan: buck test caffe2/test:nn

Reviewed By: VitalyFedyunin, luciang

Differential Revision: D34285331

fbshipit-source-id: 5144b3ae1dce02e995d1d633443fb660c57df101
(cherry picked from commit 61f12557b7c924d8cdb97c7be791bccc06e7d30d)
2022-03-04 06:40:08 +00:00
Richard Barnes
c021824128 Clean up bisect_percentile_op (#73148)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73148

Makes a bunch of things const, eliminates extraneous variables

Test Plan: Sandcastle

Reviewed By: malfet

Differential Revision: D34365183

fbshipit-source-id: 56e4c43e0c14d28f9d18903e9b05f993637489b1
(cherry picked from commit 51520edd16084270aefe8f8143799f918d7ae22d)
2022-02-25 04:33:45 +00:00
Gary Miguel
3ac7828195 Update ONNX submodule to 1.11.0 (#73111)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/73111

Reviewed By: mikaylagawarecki

Differential Revision: D34352318

Pulled By: malfet

fbshipit-source-id: aee38c5dd2b379785ecba27f7f21a877461168e1
(cherry picked from commit 424f02c69cbf123e2c8e3220d139ad336fa8fb58)
2022-02-24 08:32:32 +00:00
Steven Troxler
374de33655 [codemod][type-comments] Convert type comments in workspace_test.py (#73086)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73086

I'm wrapping up the conversion of type comments to type annotations
in caffe2. The last remaining "bulk" codemod has test failures that
are hard for me to understand, so I'm going to submit PRs for each
module individually which makes it easier to see what's causing
problems.

All the codemods were produced via LibCST and then manually cleaned up.

Test Plan: Wait for github CI

Reviewed By: shannonzhu

Differential Revision: D34344202

fbshipit-source-id: 8342267cd27a90ad91a65db858bfbd3675281c9a
(cherry picked from commit 3d0658d8cf)
2022-02-18 22:36:25 +00:00
Howard Huang
dadbf43eff Fix asserts in tests (#72864)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72864

Fixes #72860

Test Plan: Imported from OSS

Reviewed By: rohan-varma

Differential Revision: D34246987

Pulled By: H-Huang

fbshipit-source-id: 1ba47585533aff4cff9beec49bdc801f8320ffc8
(cherry picked from commit 03e45ceb89)
2022-02-16 18:35:16 +00:00
Xiaohan Wei
ca0ac3a74b [caffe2] allow dropout to take 1.0 as dropout ratio to zero-out a layer (#72741)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72741

as titled.

Context:
This is useful in fast mitigating feature induced overfitting in the sense that we can do omni-transfer on a trained model and apply dropout with ratio = 1 on features resulting in overfitting. Directly removing the features would not be feasible on omni-transfer scenarios since the downstream FC sizes would change.

Experimental records:
https://fb.quip.com/npIkAgRc8jl9#temp:C:DWC050ceaba14424d23a78462c01
Doing dropout = 1 on selected features improves the eval NE over the next few hours (compared to v0 baseline) as is shown in the figures.

Test Plan:
```
buck test caffe2/caffe2/python/operator_test:dropout_op_test
```

Reviewed By: ustctf

Differential Revision: D34178732

fbshipit-source-id: 533feebe21bc582eefd756de397d5c7807c7438d
(cherry picked from commit 5dabf9c484)
2022-02-15 19:14:46 +00:00
Nikita Shulga
511ec7f366 Fix sequence_ops_test (#72844)
Summary:
Fuzzing gone bad again: `np.unique([])` returns array or float64, but `np.delete` expects array of int

Fixes recent regressions in ONNX tests in OSS CI, see https://github.com/pytorch/pytorch/runs/5188636426?check_suite_focus=true for example

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

Reviewed By: gmagogsfm

Differential Revision: D34235295

Pulled By: malfet

fbshipit-source-id: 37ad39ac04f81ac519a5d4e4e8a86901944973bd
(cherry picked from commit 683c767e72)
2022-02-15 06:49:38 +00:00
Dmytro Dzhulgakov
6b24d7e4e5 [caffe2] Allow LpNorm to accept empty tensor (#72660)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72660

Sometimes it might happen when model gets an empty input.

For consistency with numpy and torch we should just return 0 without averaging or NaN with averaging.

Test Plan: Modified unittest

Differential Revision: D33782786

fbshipit-source-id: 90d8d63d685c96acc903c08c59eb39fad39e493c
(cherry picked from commit ca85779a4e)
2022-02-11 23:14:02 +00:00
CodemodService FBSourceClangFormatLinterBot
3a03af2f50 [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D33730646

fbshipit-source-id: 3af18fc393aecce8f03c9e9689deefcafa3a978e
(cherry picked from commit a578b8b07c)
2022-01-23 03:30:36 +00:00
Ziheng Huang
ae285d837e [1/n][caffe2] Add session based margin loss function in caffe2 operator
Summary: Add session based margin loss into caffe2 operator. This is the first diff make these 2 loss available to dper3

Test Plan:
unit test succeeds with gradient check for both new loss function
buck test //caffe2/caffe2/python/operator_test:softmax_l2r_operator_test
buck test //caffe2/caffe2/python/operator_test:margin_loss_l2r_operator_test

E2E test in bento notebook with model training in N1488923
margin loss model: f318207967 f318207399

Notice that the E2E test is run with dper change in D33532976 to change a full model

Reviewed By: devashisht

Differential Revision: D32902460

fbshipit-source-id: 8f21b9109f500583431156908b632e503ed90dbd
(cherry picked from commit 1592111aa4)
2022-01-21 23:13:36 +00:00
Thomas Viehmann
1a917e637c Bump dlpack.h to latest version (#65047)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/64995

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

Reviewed By: VitalyFedyunin

Differential Revision: D32468916

Pulled By: mruberry

fbshipit-source-id: 3e0a17a3a264a77956ea7b795bd472c6fc79566c
(cherry picked from commit bd480b9892)
2022-01-21 16:55:14 +00:00
Stephen Macke
785b6905de reduce plan generation log spam (#70880)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70880

Change loglevel to `debug` in caffe2 `optimizer.py` for logging rowwise Adagrad engine.

Test Plan: CI + sandcastle

Reviewed By: boryiingsu

Differential Revision: D33439337

fbshipit-source-id: b158249b8df771c0ec8b642210ede39972929b00
2022-01-08 10:07:06 -08:00
Richard Barnes
1622546050 use irange for loops (#70248)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70248

Modified loops in files under fbsource/fbcode/caffe2/ from the format
```
for(TYPE var=x0;var<x_max;x++)
```
to the format
```
for(const auto var: irange(xmax))
```

This was achieved by running r-barnes's loop upgrader script (D28874212) with some modification to exclude all files under /torch/jit and a number of reversions or unused variable suppression warnings added by hand.

Test Plan: Sandcastle

Reviewed By: malfet

Differential Revision: D32813863

fbshipit-source-id: 527244b4a2b220fdfe7f17dee3599603f492a2ca
2022-01-06 23:14:29 -08:00
Stephen Macke
3906f8247a clear predict_net field from PredictorExporterMeta stored in the exporter to save memory (#68485)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68485

In OSS, the only change is that we make the predict_net field of PredictorExporterMeta nullable.

Test Plan: sandcastle, let CI run

Reviewed By: boryiingsu

Differential Revision: D32467138

fbshipit-source-id: 81bd5fca695462f6a186bcfa927073874cc9c26a
2021-12-10 21:25:36 -08:00
Ramanpreet Nara
f587267dc7 Revert D31705359: use irange for loops 8
Test Plan: revert-hammer

Differential Revision:
D31705359 (17e5200441)

Original commit changeset: c9ea2fbc0f9c

fbshipit-source-id: 08fff2d12beca953ad30dd0baabf86e39ac84f14
2021-12-02 12:55:08 -08:00
Richard Barnes
17e5200441 use irange for loops 8 (#66743)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66743

Modified loops in files under fbsource/fbcode/caffe2/ from the format

`for(TYPE var=x0;var<x_max;x++)`

to the format

`for(const auto var: irange(xmax))`

This was achieved by running r-barnes's loop upgrader script (D28874212) with some modification to exclude all files under /torch/jit and a number of reversions or unused variable suppression warnings added by hand.

Test Plan: Sandcastle

Reviewed By: malfet

Differential Revision: D31705359

fbshipit-source-id: c9ea2fbc0f9cd29e97a52dcb203addc5f2abb09b
2021-12-02 10:21:29 -08:00
Jane Xu
8b0c2c18eb Fix pretrained=True for test_pt_onnx_trt (#67818)
Summary:
Addresses https://github.com/pytorch/pytorch/pull/66312#issuecomment-960357403

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

Reviewed By: malfet

Differential Revision: D32161208

Pulled By: janeyx99

fbshipit-source-id: 076e52ddc8718c74eb2941e867d92bfa4fe70f80
2021-11-04 09:49:42 -07:00
Shashank Chaudhry
06d1be2447 [NOOP][clangformat][codemod] Enable CLANGFORMAT for caffe2/caffe2/* (#67624)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67624

Test Plan: Visual inspection. Sandcastle.

Reviewed By: malfet

Differential Revision: D31986628

fbshipit-source-id: c872bded7325997a2945dbf5d4d052628dcb3659
2021-11-02 22:14:04 -07:00
Xue Li
2f099c7555 Revert D30652629: use irange for loops
Test Plan: revert-hammer

Differential Revision:
D30652629 (687c2267d4)

Original commit changeset: 0ae6c4bbbb55

fbshipit-source-id: 5c4f067b584a021c8c9656454d1ee60999600fb3
2021-10-15 15:23:10 -07:00
Richard Barnes
687c2267d4 use irange for loops (#66234)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66234

Modified loops in files under fbsource/fbcode/caffe2/ from the format

`for(TYPE var=x0;var<x_max;x++)`

to the format

`for(const auto var: irange(xmax))`

This was achieved by running r-barnes's loop upgrader script (D28874212) with some modification to exclude all files under /torch/jit and a number of reversions or unused variable suppression warnings added by hand.

bypass_size_limit
allow-large-files

Test Plan: Sandcastle

Reviewed By: ngimel

Differential Revision: D30652629

fbshipit-source-id: 0ae6c4bbbb554bad42e372792a6430e1acf15e3e
2021-10-15 13:50:33 -07:00
Lu Fang
a6eec0c60f Upgrade onnx submodule to 85546f8c44e627f8ff1181725d03cc49f675e44f (#66427)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66427

Update the onnx submodule, so https://github.com/pytorch/pytorch/pull/66140 can land.

Test Plan: ci

Reviewed By: ezyang

Differential Revision: D31544610

fbshipit-source-id: 94831ef531bbd654a6aeb744cd53a38155848079
2021-10-12 09:46:08 -07:00
Atul Jangra
49f1605392 [RFC] Reduce logging noise from AdagradOptimizer (#66443)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66443

For some reason, this logging is adding noise to a lot of flow jobs. I am not sure if this is actually needed.
This is called from the __init__ so it's logged all the time and logs all key:values the current local symbol.

Test Plan: N/A

Reviewed By: chowarfb

Differential Revision: D31534372

fbshipit-source-id: bed032b66fed548c97a6f66b1b9e905fd2738851
2021-10-11 13:25:41 -07:00
Jane Xu
7c2f53b363 [BE] set pretrained=False for onnx tests (#66312)
Summary:
Addresses this network risk mitigation mentioned in https://github.com/pytorch/pytorch/issues/65439#issuecomment-924627239.

I didn't include any mobile app/benchmarking changes because I think the pretrained matters there.

I ended up removing the changes in test_utils because those were sensitive to the pretrained variable.

I am saving the quantization test changes for another PR because they are currently disabled.

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

Reviewed By: ejguan

Differential Revision: D31542992

Pulled By: janeyx99

fbshipit-source-id: 57b4f70247af25cc96c57abd9e689c34641672ff
2021-10-11 08:29:11 -07:00
Hector Yuen
0fc6bd2e47 [gpu ne eval] disable adam decay unit test for gpu (#66056)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66056

keep running into this unrelated failure when landing diffs regarding the gpu inference project,
disabling this operator unit test in gpu because it doesn't exist

RuntimeError: [enforce fail at operator.cc:277] op. Cannot create operator of type 'SmartDecaySparseAdam' on the device 'CUDA'. Verify that implementation for the corresponding device exist. It might also happen if the binary is not linked with the operator implementation code. If Python frontend is used it might happen if dyndep.InitOpsLibrary call is missing. Operator def: input: "param" input: "mom1" input: "mom2" input: "last_seen" input: "indices" input: "grad" input: "lr" input: "iter" output: "param" output: "mom1" output: "mom2" output: "last_seen" name: "" type: "SmartDecaySparseAdam" arg { name: "beta1" f: 0 } arg { name: "beta2" f: 0.9 } arg { name: "epsilon" f: 1e-05 } device_option { device_type: 1 }

https://www.internalfb.com/intern/testinfra/diagnostics/5910974579962988.562949996565057.1633122845/

Test Plan: sandcastle

Reviewed By: jianyuh

Differential Revision: D31364731

fbshipit-source-id: 7fbd994cbe7f6ca116f5f34506a1ed7f14759bdf
2021-10-03 07:40:23 -07:00
Pruthvi Madugundu
085e2f7bdd [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65610

- Replace HIP_PLATFORM_HCC with USE_ROCM
- Dont rely on CUDA_VERSION or HIP_VERSION and use USE_ROCM and ROCM_VERSION.

- In the next PR
   - Will be removing the mapping from CUDA_VERSION to HIP_VERSION and CUDA to HIP in hipify.
   - HIP_PLATFORM_HCC is deprecated, so will add HIP_PLATFORM_AMD to support HIP host code compilation on gcc.

cc jeffdaily sunway513 jithunnair-amd ROCmSupport amathews-amd

Reviewed By: jbschlosser

Differential Revision: D30909053

Pulled By: ezyang

fbshipit-source-id: 224a966ebf1aaec79beccbbd686fdf3d49267e06
2021-09-29 09:55:43 -07:00
Nikita Shulga
399214efd6 Revert D31172530: [pytorch][PR] Enable CUPTI for kineto by default on windows
Test Plan: revert-hammer

Differential Revision:
D31172530 (6b60884f12)

Original commit changeset: 2c69ed0282c5

fbshipit-source-id: 649e040a8c44b0f536a8db397b4325309a285934
2021-09-24 19:18:15 -07:00
Guangyun Han
6b60884f12 Enable CUPTI for kineto by default on windows (#65608)
Summary:
Retry of https://github.com/pytorch/pytorch/pull/62175

See https://github.com/pytorch/pytorch/pull/62175#issuecomment-926411151 for more information.

malfet gdankel

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

Reviewed By: zou3519

Differential Revision: D31172530

Pulled By: gdankel

fbshipit-source-id: 2c69ed0282c54fa6cdb6e604096d0370e230fd66
2021-09-24 13:00:49 -07:00