Commit Graph

64482 Commits

Author SHA1 Message Date
Jerry Zhang
1b51d29b66 [quant][pt2e] Enable constant folding for quantize ops (#109343)
Summary:
This PR added constant folding for quantize ops so that instead of storing fp32 weight in the
quantized model, we'll get int8/int16 etc. weight

Test Plan:
python test/test_quantization.py TestQuantizePT2E.test_fold_quantize

also will verify in executorch later

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D49399210](https://our.internmc.facebook.com/intern/diff/D49399210)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109343
Approved by: https://github.com/kimishpatel, https://github.com/jgong5
2023-09-27 06:04:45 +00:00
PyTorch UpdateBot
6138750ab1 [vision hash update] update the pinned vision hash (#110127)
This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/main/.github/workflows/_update-commit-hash.yml).
Update the pinned vision hash.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110127
Approved by: https://github.com/pytorchbot
2023-09-27 04:25:39 +00:00
Angela Yi
ddbf1aab64 [export] Add dynamic_shapes to _export.aot_compile (#110101)
Summary: Following the new dynamic_shapes API (introduced in https://github.com/pytorch/pytorch/pull/108448), we will also add a dynamic_shapes API to _export.aot_compile

Test Plan: CI

Differential Revision: D49653815

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110101
Approved by: https://github.com/gmagogsfm
2023-09-27 04:10:22 +00:00
Edward Z. Yang
f7c9ef88f5 Add masked_select abstract impl (#110103)
Fixes https://github.com/pytorch/pytorch/issues/109871

Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110103
Approved by: https://github.com/bdhirsh
2023-09-27 04:07:58 +00:00
Wang Ran (汪然)
33d8f5f73e fix typo (#109965)
fix typo
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109965
Approved by: https://github.com/zou3519, https://github.com/kit1980
2023-09-27 03:32:04 +00:00
Edward Z. Yang
869226bf94 Avoid passing generator to parametrize (#110104)
Fixes

```
ValueError: <function TestMeta.test_layer_norm_backward at 0x7f555f56e440>: An empty arg_values was passed to @parametrize. Note that this may result from reuse of a generator.
```

Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110104
Approved by: https://github.com/malfet, https://github.com/jbschlosser, https://github.com/voznesenskym
2023-09-27 02:52:48 +00:00
SS-JIA
dec140f1ea [core IR] Add a core decomposition for aten.all (#110093)
## Context

Change the ref implementation of `aten.all` to only use other `torch` operators such that we can use it for the core ATen decomposition table. This will replace the decomposition for `aten.all` that was used specifically by Inductor.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110093
Approved by: https://github.com/manuelcandales, https://github.com/peterbell10, https://github.com/lezcano
2023-09-27 01:31:41 +00:00
Yukio Siraichi
51a8c166a6 Add test for ShapeEnv recording fallback. (#109944)
This PR adds a test for the previous PR in this stack: #109904. In summary, it calls
functions decorated with `@record_shapeenv_event`, that don't have an explicit `ShapeEnv`
parameter, with arguments that don't hold a `ShapeEnv` instance.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109944
Approved by: https://github.com/ezyang
2023-09-27 00:50:14 +00:00
SS-JIA
9928c10e71 [core IR] Add glu as a core decomposition (#110043)
## Context

Add the decomposition for `aten.glu` as a decomposition in the core ATen decomposition table. Don't use it in the Inductor decomposition table since Inductor has a lowering for it.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110043
Approved by: https://github.com/peterbell10, https://github.com/lezcano
ghstack dependencies: #110046
2023-09-27 00:23:05 +00:00
Yang Chen
4d0ae7c9da [inductor] support _scaled_dot_product_flash_attention fallback (#110085)
Summary:
This PR supports _scaled_dot_product_flash_attention fallback kernel.
Note that in the abi_compatible mode, we retrieve outputs by passing
output argument pointers rather than relying on std::get.

It also fixes an issue related to dynamic shapes, where we wrongfully
query undefined dynamic symbols.

Test Plan: ci

Reviewed By: frank-wei

Differential Revision: D49620191

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110085
Approved by: https://github.com/desertfire
2023-09-27 00:09:56 +00:00
Shiyan Deng
19ca883f8b [pytorch][jit] allow passing in obj loader in unpickle api (#109730)
Summary: We are trying to use wired message to pass python objects like KJT. In order to make JIT be able to unpickle it, we need to provide a type resolver as well as an obj loader. This diff modify the interface to let we be able to do that.

Test Plan:
Rely on current CI to make sure existing usage doesn't break.

In the next diff, test e2e

Differential Revision: D49438569

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109730
Approved by: https://github.com/davidberard98
2023-09-26 23:50:20 +00:00
Edward Z. Yang
3262c5358f Use _check_is_size for validate_dim_length (#109849)
_check_is_size has some extra juice for unbacked SymInts, use it.

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

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109849
Approved by: https://github.com/yanboliang
2023-09-26 23:33:31 +00:00
Wanchao Liang
27443eadeb [dtensor][7/n] remove reduction rule (#109144)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109144
Approved by: https://github.com/fduwjj
ghstack dependencies: #108263, #108264
2023-09-26 22:24:50 +00:00
Wanchao Liang
2dd9a79d22 [dtensor][6/n] refactor reduction to use op strategy (#108264)
This PR refactors the reduction op to use strategy based propagation
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108264
Approved by: https://github.com/fduwjj
ghstack dependencies: #108263
2023-09-26 22:24:50 +00:00
Wanchao Liang
986d255db2 [dtensor][5/n] switch random ops to op strategy (#108263)
This PR switches the random ops to use op strategy instead of rule
based, this is a first series of PRs to refactor ops after we refactor
op dispatch logic
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108263
Approved by: https://github.com/fduwjj
2023-09-26 22:24:42 +00:00
Huy Do
d0f82cd082 Use Dr.CI results to classify flaky failures in trymerge (#110054)
After https://github.com/pytorch/test-infra/pull/4589, we can now query Dr.CI to get the list of flaky failures there.  This change queries Dr.CI API endpoint and check if the failure is a flaky one using `is_flaky` function.

Because the change is relatively large, I'm breaking it down to several smaller PRs in this order:

* [x] This PR queries Dr.CI and adds `is_flaky` check
* [ ] Clean up the flaky rules logic because it has already been implemented on Dr. CI
* [ ] Clean up the broken trunk logic for the same reason

### Testing

* Create a new `drci_mocks.json` file to catch the JSON response from Dr.CI API endpoint. The API requires `DRCI_BOT_KEY`.
*  `pytest -v test_trymerge.py`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110054
Approved by: https://github.com/clee2000
2023-09-26 21:24:21 +00:00
Richard Zou
bb9779ecd2 Revert D49640259: Revert D49615962: [optests] Test names in failure dicts should be prefixed with test class (#110094)
Summary: Revert D49640259: Revert D49615962: [optests] Test names in failure dicts should

Test Plan: revert-hammer

Differential Revision: D49645397

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110094
Approved by: https://github.com/izaitsevfb
2023-09-26 21:16:36 +00:00
Khushi Agrawal
ac3190c52c [cpu] vectorize atanh (#107786)
Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107786
Approved by: https://github.com/jgong5, https://github.com/sanchitintel, https://github.com/ezyang
2023-09-26 20:20:46 +00:00
PyTorch MergeBot
194d9aa0f2 Revert "[Dynamo] Match closures by code ID (#109427)"
This reverts commit 3de0857503.

Reverted https://github.com/pytorch/pytorch/pull/109427 on behalf of https://github.com/voznesenskym due to Fails test `PYTORCH_TEST_WITH_DYNAMO=1 python test_ops.py -k test_out_warning__refs_cat_cpu ([comment](https://github.com/pytorch/pytorch/pull/109427#issuecomment-1736101561))
2023-09-26 18:54:36 +00:00
Angela Yi
a7409695bb [export] Verifier for exported program (#109519)
Summary:
X-link: https://github.com/pytorch/executorch/pull/292

Added a verifier for the graph signature in a exported program

Test Plan: CI

Differential Revision: D48926643

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109519
Approved by: https://github.com/zhxchen17
2023-09-26 18:47:43 +00:00
Jane Xu
0a60219fe3 [foreach] Fix 0-size handling for real for real (#109402)
@crcrpar's last attempt to fix the 0-size problem unfortunately did not pass all cases. See my comment in https://github.com/pytorch/pytorch/issues/100701. When we have a tail tensor of size 0, the old code would mess with the chunk logic to check the previous tensor's length. This is flawed because:
1. if the previous tensor was also 0 sized, (so a tensor list of [tensor, tensor, tensor, ..., 0-sized tensor, 0-sized tensor],) chunks would still be 0 and the nested for loop would be missed.
2. the nested forloop pronounces side effects on tensorListMeta that _shouldn't_ be there! This can mess up the compute in unexpected ways that I haven't really needed to reason through.

We noticed that the problem had not been fixed due to an internal report. This PR solves the issue by:
- removing the finagling of chunks when the tail tensor is 0-sized
- adding a surefire way for the kernel to be launched in the case where the last tensor is 0-sized AND there's content in the metadata, signifying there is stuff to compute still.

## test plan

As I went through the code, I also added some comments explaining what's up and modified our tensor inputs to ensure that this case is tested in the test_parity test in test_foreach.py. Yes, I do realize there is quite a bit of duplication and that this file could be due for a refactor. That said, the primary goal of this PR is to fix the pretty egregious bug and refactoring can be a followup.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109402
Approved by: https://github.com/albanD
2023-09-26 17:38:20 +00:00
Rodrigo Kumpera
317e39a8ad [C10d] Cleanup collective sequence number. (#109136)
Sequence numbers must be associated with a Work object
if we want to use it as a way to report collective progress.

The API surface change is introducing Work::getSequenceNumber, which
should eventually be exposed to python.

The bulk of this change is changing gloo to make the sequence number
be always in use and weave it to the dozens subclasses of Work.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109136
Approved by: https://github.com/fduwjj
2023-09-26 17:17:04 +00:00
Driss Guessous
818f2297e6 Ensure fill_ works when value is a view of self (#109835)
# Summary
Introduced a BC breaking change in #109533 when self is a view of the value. By using the copy_() op inside fill_ we were hitting `assert_no_partial_overlap` in tensor iterator.

Ideal we would be able to avoid this check if value.numel() ==1 . But rather than monkeying around with tensor iterator I just clone the input instead.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109835
Approved by: https://github.com/mikaylagawarecki
2023-09-26 17:12:48 +00:00
Richard Barnes
3705e65254 Add pin_memory to torch.Tensor type annotation args (#109797)
Test Plan: Sandcastle

Differential Revision: D49504528

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109797
Approved by: https://github.com/jianyuh
2023-09-26 17:12:37 +00:00
Zain Rizvi
1277d0e834 [BE] Add sharding data by default to metrics (#110035)
Extend metric library to allow setting global metrics on a process level which will always be emitted.

Current use case for them is to include shard information every time a metric is emitted by run_test.py

<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 0cae92c</samp>

> _`run_test` refactored_
> _Sharding metrics in Rockset_
> _Autumn of testing_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110035
Approved by: https://github.com/clee2000
2023-09-26 17:06:49 +00:00
Li-Huai (Allan) Lin
d91492a7a4 [MPS] Fix sort with empty tensor. (#109584)
Fixes #107284
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109584
Approved by: https://github.com/kulinseth, https://github.com/albanD
ghstack dependencies: #109557, #109574
2023-09-26 16:30:38 +00:00
Bin Bao
993530ee4f [aotinductor] Relax the CUDAGuard device index check (#110030)
Summary: Although AOTInductor only supports running on a single cuda device, it does work in the case where there is a mix of cpu and cuda ops. So instead of asserting if a CUDA index appears for the first time, we check if there is only one cuda device index. This solves https://github.com/pytorch/pytorch/issues/109655

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110030
Approved by: https://github.com/jansel
2023-09-26 16:23:23 +00:00
Catherine Lee
47adcd412f Increase timeout for slow tests (#109206)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109206
Approved by: https://github.com/huydhn
2023-09-26 16:18:38 +00:00
leslie-fang-intel
0dcea70bfd fix sfdp patern 13 accuracy issue (#110001)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110001
Approved by: https://github.com/eellison
2023-09-26 15:23:45 +00:00
PyTorch MergeBot
2393864070 Revert "[optests] Test names in failure dicts should be prefixed with test class (#110045)"
This reverts commit 76fcec74c4.

Reverted https://github.com/pytorch/pytorch/pull/110045 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/110045#issuecomment-1735711094))
2023-09-26 14:56:08 +00:00
DanilBaibak
a5de10d7a5 Remove linux.t4g.2xlarge Usage (#110064)
Switched from linux.t4g.2xlarge to linux.arm64.2xlarge
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110064
Approved by: https://github.com/atalman, https://github.com/malfet
2023-09-26 14:30:35 +00:00
rzou
ea20db8aa0 [optests] Excise unused operator_compile_check (#110011)
The recommendation is to just use `opcheck`, which has superceded all
uses of `operator_compile_check`.

Test Plan:
- existing tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110011
Approved by: https://github.com/ezyang
ghstack dependencies: #109912
2023-09-26 13:24:21 +00:00
PyTorch MergeBot
812bf847b7 Revert "Add test for ShapeEnv recording fallback. (#109944)"
This reverts commit a4dec8d306.

Reverted https://github.com/pytorch/pytorch/pull/109944 on behalf of https://github.com/atalman due to New test failing internally ([comment](https://github.com/pytorch/pytorch/pull/109944#issuecomment-1735512734))
2023-09-26 13:11:22 +00:00
Aleksei Nikiforov
e05eb69c93 Don't link to libcpuinfo on s390x (#109875)
Don't even build it.
It does not support s390x.

This is a follow up for https://github.com/pytorch/pytorch/pull/109496

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109875
Approved by: https://github.com/kit1980
2023-09-26 12:43:35 +00:00
Peter Bell
92d86cd1ad [inductor] Fix triton compiler error in multilayer any (#109325)
Fixes #109196

When we have a split reduction and the tensor is not an even multiple of the split size,
we use `ops.masked` to pad to an even multiple. In the case here we generated:
```python
tmp5 = tl.where(mask, tmp4, 0)
```

which implicitly promotes our boolean value to `int32`. The fix is to give the default
value the same dtype as `result`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109325
Approved by: https://github.com/lezcano
2023-09-26 12:29:29 +00:00
PyTorch MergeBot
1b90f07f5a Revert "Reland "Update AOTAutograd to use FunctionalTensorMode instead of C++ functionalization (#106406)" (#109906)"
This reverts commit d0fe8fa5db.

Reverted https://github.com/pytorch/pytorch/pull/109906 on behalf of https://github.com/atalman due to Breaks internal tests ([comment](https://github.com/pytorch/pytorch/pull/109906#issuecomment-1735416852))
2023-09-26 12:10:25 +00:00
Evgeni Burovski
132a138a01 MAINT: pytorchify torch._numpy tests: core/ and fft/ (#109815)
1. Inherit from TestCase
2. Use pytorch parametrization
3. Use unittest.expectedFailure to mark xfails, also unittest skips

All this to make pytest-less invocation work:

$ python test/torch_np/test_basic.py

cross-ref #109593, #109718, #109775

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109815
Approved by: https://github.com/lezcano
2023-09-26 11:04:24 +00:00
wz337
8140494afd [3/N][2D] Enable training with new 2D flow (#110034)
Replacing https://github.com/pytorch/pytorch/pull/109553 as it gets reverted.

This PR enables training with new 2D flow and adds associated test. In addition, this PR moves the tensor/parallel/_data_parallel_utils.py that are fsdp specific back to tensor/parallel/fsdp.py to avoid circular dependency for ddp.py and test/distributed/tensor/parallel/test_ddp_2d_parallel.py.

state_dict related changes would be in later PRs.

cc. @fegin, @fduwjj, @wanchaol, @awgu
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110034
Approved by: https://github.com/fduwjj
2023-09-26 09:14:15 +00:00
Animesh Jain
0673aa3d28 [dynamo][guards-log] Print nn module guard saved dict versions for debugging (#110028)
This is the output for nn module guards

~~~
[DEBUG] GUARDS:
[DEBUG] hasattr(L['x'], '_dynamo_dynamic_indices') == False           # _dynamo/variables/builder.py:1356 in wrap_fx_proxy_cls
[DEBUG] ___check_obj_id(L['self'], 139820807110912)                   # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] __nn_module_guard_0(L['self']) # versions(mod=9998, _parameters=1194395, _buffers=1194397, _modules=1194423, _forward_hooks=1194405, _forward_pre_hooks=1194411, _backward_hooks=1194402, _backward_pre_hooks=1194400)  # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] ___check_obj_id(L['self'].mods[0], 139817945727568)           # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] __nn_module_guard_1(L['self'].mods[0]) # versions(mod=10001, _parameters=1194428, _buffers=1194430, _modules=1194522, _forward_hooks=1194438, _forward_pre_hooks=1194444, _backward_hooks=1194435, _backward_pre_hooks=1194433)  # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] ___check_obj_id(L['self'].mods[1], 139817945560640)           # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] __nn_module_guard_2(L['self'].mods[1]) # versions(mod=10001, _parameters=1194660, _buffers=1194662, _modules=1194753, _forward_hooks=1194670, _forward_pre_hooks=1194676, _backward_hooks=1194667, _backward_pre_hooks=1194665)  # for mod in self.mods:  # examples/graph_break.py:35 in forward
[DEBUG] ___check_obj_id(L['self'].mods[0].linear, 139817945727856)    # return self.linear(a)  # examples/graph_break.py:24 in helper
[DEBUG] __nn_module_guard_3(L['self'].mods[0].linear) # versions(mod=10004, _parameters=1470004, _buffers=1194467, _modules=1194493, _forward_hooks=1194475, _forward_pre_hooks=1194481, _backward_hooks=1194472, _backward_pre_hooks=1194470)  # return self.linear(a)  # examples/graph_break.py:24 in helper
[DEBUG] ___check_obj_id(L['self'].mods[1].linear, 139817945561120)    # return self.linear(a)  # examples/graph_break.py:24 in helper
[DEBUG] __nn_module_guard_4(L['self'].mods[1].linear) # versions(mod=10004, _parameters=1470008, _buffers=1194699, _modules=1194725, _forward_hooks=1194707, _forward_pre_hooks=1194713, _backward_hooks=1194704, _backward_pre_hooks=1194702)  # return self.linear(a)  # examples/graph_break.py:24 in helper
[DEBUG] utils_device.CURRENT_DEVICE == None                           # _dynamo/output_graph.py:373 in init_ambient_guards
~~~

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110028
Approved by: https://github.com/ezyang
ghstack dependencies: #110023, #110039
2023-09-26 08:53:07 +00:00
SS-JIA
5df8aca994 [core IR] Add a core decomposition for floor_divide (#110046)
## Context

Introduce a core decomposition for `aten.floor_divide` into other `aten` ops, and add it to the core ATen decomposition table.

This replaces the decomposition of `floor_divide` that was used by Inductor. I noticed there was a note on that decomposition

```
# TorchInductor-only decomposition. It should not be taken to core.
# See https://github.com/pytorch/torchdynamo/pull/1120
```

but couldn't discern the reason why this is the case. cc: @lezcano

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110046
Approved by: https://github.com/peterbell10
2023-09-26 08:39:21 +00:00
Yukio Siraichi
26e8cc0465 Add test for ShapeEnv state when not recording. (#109945)
This PR adds a test for checking `ShapeEnv` state when it's built with
`should_record_events=False`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109945
Approved by: https://github.com/ezyang
ghstack dependencies: #109904, #109944
2023-09-26 07:20:46 +00:00
Animesh Jain
2ac7e52d34 [dynamo][nn_module_guards] Config flag to disable nn_module_guards (#110039)
This flag is requested by @Chillee who is seeing recompilations with simple gpt experiments. We are observing recompilations because `_parameters` ordered dict keeps changing from run to run, and its unclear why that is happening.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110039
Approved by: https://github.com/Chillee
ghstack dependencies: #110023
2023-09-26 06:35:23 +00:00
Justin Yip
dd819138da [pytorch vulkan] add tensor vulkan check for at::cat (#109936)
Summary:
Saw this issue when running pytorch vulkan on a LSTM model:

https://www.internalfb.com/phabricator/paste/view/P834993118

Found that we don't always to the vulkan transfer on `at::cat`

Test Plan:
(Not running the LSTM model yet. Since there are other crahses.)

```
[yipjustin@47884.od /data/sandcastle/boxes/fbsource (3fd2308f8|remote/fbcode/warm_fbcode_od_stable...)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin  -- --gtest_filter="*cat*"
Building: finished in 0.1 sec (100%) 330/330 jobs, 0/330 updated
  Total time: 0.2 sec
BUILD SUCCEEDED
Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc
Note: Google Test filter = *cat*
[==========] Running 43 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 43 tests from VulkanAPITest
[ RUN      ] VulkanAPITest.replication_pad2d
[       OK ] VulkanAPITest.replication_pad2d (102 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_invalidinputs_exceptions
[       OK ] VulkanAPITest.cat_4d_dim0_invalidinputs_exceptions (67 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_samebatch_success
[       OK ] VulkanAPITest.cat_4d_dim0_samebatch_success (111 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_diffbatch_success
[       OK ] VulkanAPITest.cat_4d_dim0_diffbatch_success (76 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_singledepth_success
[       OK ] VulkanAPITest.cat_4d_dim0_singledepth_success (40 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_singletensor_success
[       OK ] VulkanAPITest.cat_4d_dim0_singletensor_success (7 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_twotensors_success
[       OK ] VulkanAPITest.cat_4d_dim0_twotensors_success (30 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim0_negdim_success
[       OK ] VulkanAPITest.cat_4d_dim0_negdim_success (78 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_negdim_success
[       OK ] VulkanAPITest.cat_4d_dim1_negdim_success (130 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim2_negdim_success
[       OK ] VulkanAPITest.cat_4d_dim2_negdim_success (75 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim3_negdim_success
[       OK ] VulkanAPITest.cat_4d_dim3_negdim_success (68 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_texture2d_success
[       OK ] VulkanAPITest.cat_4d_dim1_texture2d_success (2 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_singledepth_success
[       OK ] VulkanAPITest.cat_4d_dim1_singledepth_success (65 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_singletensor_success
[       OK ] VulkanAPITest.cat_4d_dim1_singletensor_success (8 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_bat1_mult4ch_success
[       OK ] VulkanAPITest.cat_4d_dim1_bat1_mult4ch_success (9 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_bat2_mult4ch_success
[       OK ] VulkanAPITest.cat_4d_dim1_bat2_mult4ch_success (18 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim1_mult4ch_mixed_success
[       OK ] VulkanAPITest.cat_4d_dim1_mult4ch_mixed_success (60 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim2_sameheight_success
[       OK ] VulkanAPITest.cat_4d_dim2_sameheight_success (80 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim2_diffheight_success
[       OK ] VulkanAPITest.cat_4d_dim2_diffheight_success (69 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim2_singledepth_success
[       OK ] VulkanAPITest.cat_4d_dim2_singledepth_success (12 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim2_invalidinputs_exceptions
[       OK ] VulkanAPITest.cat_4d_dim2_invalidinputs_exceptions (63 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim3_invalidinputs_exceptions
[       OK ] VulkanAPITest.cat_4d_dim3_invalidinputs_exceptions (86 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim3_samewidth_success
[       OK ] VulkanAPITest.cat_4d_dim3_samewidth_success (117 ms)
[ RUN      ] VulkanAPITest.cat_4d_dim3_diffwidth_success
[       OK ] VulkanAPITest.cat_4d_dim3_diffwidth_success (72 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim0_mult4ch_success
[       OK ] VulkanAPITest.cat_3d_dim0_mult4ch_success (12 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim0_diff_channel_success
[       OK ] VulkanAPITest.cat_3d_dim0_diff_channel_success (28 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim0_same_channel_success
[       OK ] VulkanAPITest.cat_3d_dim0_same_channel_success (15 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim1_diffheight_success
[       OK ] VulkanAPITest.cat_3d_dim1_diffheight_success (21 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim1_same_height_success
[       OK ] VulkanAPITest.cat_3d_dim1_same_height_success (10 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim2_diffwidth_success
[       OK ] VulkanAPITest.cat_3d_dim2_diffwidth_success (21 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim2_samewidth_success
[       OK ] VulkanAPITest.cat_3d_dim2_samewidth_success (11 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim0_negdim_success
[       OK ] VulkanAPITest.cat_3d_dim0_negdim_success (25 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim1_negdim_success
[       OK ] VulkanAPITest.cat_3d_dim1_negdim_success (23 ms)
[ RUN      ] VulkanAPITest.cat_3d_dim2_negdim_success
[       OK ] VulkanAPITest.cat_3d_dim2_negdim_success (10 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim0_same_height_success
[       OK ] VulkanAPITest.cat_2d_dim0_same_height_success (3 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim0_diff_height_success
[       OK ] VulkanAPITest.cat_2d_dim0_diff_height_success (2 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim1_same_width_success
[       OK ] VulkanAPITest.cat_2d_dim1_same_width_success (3 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim1_diff_width_success
[       OK ] VulkanAPITest.cat_2d_dim1_diff_width_success (4 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim0_negdim_success
[       OK ] VulkanAPITest.cat_2d_dim0_negdim_success (3 ms)
[ RUN      ] VulkanAPITest.cat_2d_dim1_negdim_success
[       OK ] VulkanAPITest.cat_2d_dim1_negdim_success (3 ms)
[ RUN      ] VulkanAPITest.cat_1d_dim0_same_width_success
[       OK ] VulkanAPITest.cat_1d_dim0_same_width_success (52 ms)
[ RUN      ] VulkanAPITest.cat_1d_dim0_diff_width_success
[       OK ] VulkanAPITest.cat_1d_dim0_diff_width_success (0 ms)
[ RUN      ] VulkanAPITest.cat_1d_dim0_negdim_success
[       OK ] VulkanAPITest.cat_1d_dim0_negdim_success (0 ms)
[----------] 43 tests from VulkanAPITest (1717 ms total)

[----------] Global test environment tear-down
[==========] 43 tests from 1 test suite ran. (1717 ms total)
[  PASSED  ] 43 tests.

  YOU HAVE 4 DISABLED TESTS
```

Differential Revision: D49566743

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109936
Approved by: https://github.com/SS-JIA
2023-09-26 06:08:17 +00:00
Zain Rizvi
5dcee01c2b Monitor baseline for TD prioritizations (#110031)
For tests that TD prioritizes, we should track what their ordering _would have been_ if none of the TD heuristics had applied to it.

This is useful for two reasons:
1. It lets us better understand TD may have contributed to that test running sooner
2. it's possible that heuristics actually mark a test as less important than the default sorting would have claimed (the default sorts tests in a fixed order). This will let us track how often that happens
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110031
Approved by: https://github.com/clee2000
2023-09-26 04:27:16 +00:00
Li-Huai (Allan) Lin
ac1e85161e [MPS] Fix nll_loss with default ignore_index (#109574)
`-100` should be a valid `ignore_index` as indicated in the linked issue. This PR also cleans up some unnecessary MPSTensor copies.

Fixes #108148
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109574
Approved by: https://github.com/kulinseth
ghstack dependencies: #109557
2023-09-26 04:13:09 +00:00
Li-Huai (Allan) Lin
0087118997 [MPS] Fix mps to cpu copy with storage offset (#109557)
Fix #108978

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109557
Approved by: https://github.com/DenisVieriu97
2023-09-26 04:13:08 +00:00
Li-Huai (Allan) Lin
129f535778 [VMAP] Add linspace and logspace batch rules (#105451)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105451
Approved by: https://github.com/zou3519
ghstack dependencies: #107958, #104889
2023-09-26 04:08:24 +00:00
wangxiyuan
5589b81173 Remove redundant change for gloo (#106750)
HIP deprecated symbols are removed by d74270ece2 and fe2ad9c328 which is included in pytorch gloo already.

gloo in pytorch master: 597accfd79

There is no need to fix it in pytorch now.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106750
Approved by: https://github.com/jithunnair-amd, https://github.com/kit1980
2023-09-26 03:46:14 +00:00
mikey dagitses
dddf07e56a Reland: implement a function to convert a storage to copy-on-write (#110022)
Relands #100819

In addition, the `impl_cow_context` library is combined into the base c10 core library, and COW unit tests are combined into just one binary.

Part of #109833

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110022
Approved by: https://github.com/ezyang
2023-09-26 03:33:18 +00:00
rzou
76fcec74c4 [optests] Test names in failure dicts should be prefixed with test class (#110045)
We want to use the same failures dict for multiple TestCase. This happens
common in e.g. fbgemm. To move towards that, we need to prefix each test name
with their test class to avoid ambiguity

Differential Revision: [D49615962](https://our.internmc.facebook.com/intern/diff/D49615962/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110045
Approved by: https://github.com/williamwen42
2023-09-26 03:21:12 +00:00