Commit Graph

59972 Commits

Author SHA1 Message Date
dfa951171a Fix typo in RELEASE.md and README.md (#100536)
Some minor spelling, grammar and typographical mistakes have been fixed in RELEASE.md & README.md files
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100536
Approved by: https://github.com/ezyang
2023-05-10 05:06:45 +00:00
2b250e1921 inductor(CPU): fix issue when padding/stride/dilation size is one for cpu weight packing pass (#100951)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100951
Approved by: https://github.com/jgong5, https://github.com/EikanWang, https://github.com/jansel
2023-05-10 04:53:37 +00:00
083f88e126 PyTorch -> C++17 (#98209) (#100557)
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 4f0b524</samp>

This pull request updates the codebase and the documentation to use C++17 instead of C++14 as the minimum required C++ standard. This affects the `ATen`, `c10`, and `torch` libraries and their dependencies, as well as the CI system and the `conda` package metadata.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100557
Approved by: https://github.com/malfet
2023-05-10 04:47:35 +00:00
30cecc0e11 [MPS] Fix build regressions introduced by #92868 (#101036)
https://github.com/pytorch/pytorch/pull/92868 introduced  `OBJC` and `OBJCXX` language dialects, but fails to propagate some important flags, like OpenMP include path(if found),  `-fno-objc-arc` and `-Wno-unguarded-availability-new` suppression.

This PR remedies that and fixes https://github.com/pytorch/pytorch/issues/100925

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 62677d4</samp>

This pull request improves the support for MPSGraph on Apple platforms by fixing some CMake flags for parallelism and memory management. It modifies `cmake/Dependencies.cmake` and `CMakeLists.txt` accordingly.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/101036
Approved by: https://github.com/atalman, https://github.com/huydhn
2023-05-10 04:15:41 +00:00
b004c0b3c6 [inductor] default cache_dir in torch._inductor.codecache should be lazily evaluated (#100824)
`getpass.getuser` may raise exceptions in some circumstances, where users cannot override the default cache dir with env `TORCHINDUCTOR_CACHE_DIR`. Hence the assemble of default cache dir should be lazily evaluated.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100824
Approved by: https://github.com/ezyang
2023-05-10 03:36:39 +00:00
b06c180a32 CUBLAS Flag (CUBLAS_GEMM_DFALT_TENSOR_OP -> CUBLAS_GEMM_DEFAULT_TENSOR_OP) (#100976)
Looking at the docs https://docs.nvidia.com/cuda/cublas/index.html?highlight=cublasGemmEx#cublasgemmex It seems like the flag should be `CUBLAS_GEMM_DEFAULT_TENSOR_OP`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100976
Approved by: https://github.com/ezyang
2023-05-10 03:26:31 +00:00
535368f00e [vision hash update] update the pinned vision hash (#101032)
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/101032
Approved by: https://github.com/pytorchbot
2023-05-10 03:24:19 +00:00
649e609667 [c10d] make ProcessGroupNCCL work.wait() respect timeout (#100162)
Fixes #83486

TestDistBackendWithSpawn.test_monitored_barrier_allreduce_hang and NcclErrorHandlingTest.test_nccl_timeout passed.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100162
Approved by: https://github.com/ezyang
2023-05-10 03:07:47 +00:00
b33c9c7c9f [inductor] support vec type conversion between float and bool (#100950)
Fix https://github.com/pytorch/pytorch/issues/100466
Fix https://github.com/pytorch/pytorch/issues/100800

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100950
Approved by: https://github.com/EikanWang, https://github.com/jansel
2023-05-10 02:16:06 +00:00
44e73da444 Extend assert statement to include ListVariable (#100841)
Fixes #100697

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100841
Approved by: https://github.com/lezcano, https://github.com/anijain2305
2023-05-10 01:57:10 +00:00
27d5019e39 STFT: correct stft definition and better document tensor shapes (#100427)
Fixes #100177

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100427
Approved by: https://github.com/lezcano
2023-05-10 01:42:01 +00:00
2241aaa60c Revert "[quant][pt2e] Change input act annotation to a map and allow dynamic quantization for non zeroth argument (#101005)"
This reverts commit f08ddae8885bc703408b949642d4a5bee30efce8.

Reverted https://github.com/pytorch/pytorch/pull/101005 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/101005#issuecomment-1541143426))
2023-05-10 01:27:47 +00:00
76cc3ab4f3 [CI] Delete skips from https://github.com/pytorch/pytorch/issues/93847 (#96049)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96049
Approved by: https://github.com/jansel
2023-05-10 01:27:27 +00:00
bf214f40d4 explicitly check or discard cudaGetLastError return value (#100488)
cudaGetLastError and hipGetLastError will clear any error value within CUDA and HIP, respectively. This is often done on purpose to clear benign errors. Discarding the return value should be indicated by casting to void and a nearby comment. This silences warnings from HIP:

warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]

Performing an audit of pytorch sources found one use of cudaGetLastError that was incorrectly ignored in IndexKernel.cu.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100488
Approved by: https://github.com/ezyang
2023-05-10 01:24:07 +00:00
f08ddae888 [quant][pt2e] Change input act annotation to a map and allow dynamic quantization for non zeroth argument (#101005)
Summary:
Previously the node annotation looks like the following:
```
node.meta["..."] = {
    "input_act_obs_or_fq_ctr": ...,
    "weight_obs_or_fq_ctr": ...,
    "weight_index": 1,
}
```
Basically we need specifiy the index for weight and also have a separate key for weight config, in this PR we changed that to:
```
node.meta["..."] = {
    "input_act_obs_or_fq_ctr_map": {input_node: ..., weight_node: ...},
}
```
This can support specifying the observer/fake quant constructor for any argument of the node

Test Plan: buck2 test @//mode/opt //caffe2/test:quantization_pt2e -- --exact 'caffe2/test:quantization_pt2e - test_resnet18_with_quantizer_api (quantization.pt2e.test_quantize_pt2e.TestQuantizePT2EModels)'

Reviewed By: kimishpatel

Differential Revision: D45553195

Pull Request resolved: https://github.com/pytorch/pytorch/pull/101005
Approved by: https://github.com/kimishpatel
2023-05-10 00:42:25 +00:00
20a231b55b [BE] Prevent pytest from thinking this class defines any tests (#100949)
Fixes the error:

```
/var/lib/jenkins/pytorch/test/inductor/test_torchinductor.py:6021: PytestCollectionWarning: cannot collect test class 'TestFailure' because it has a __init__ constructor (from: test/inductor/test_torchinductor.py)
  class TestFailure:
```

It does so by marking the class as not actually being a test class, despite it's name starting with `Test`.
For more details see: https://stackoverflow.com/a/72465142/21539

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100949
Approved by: https://github.com/huydhn
2023-05-10 00:20:11 +00:00
6308563a39 Enable reordering pass (#100747)
Restricts the reordering pass to only reorder nodes before the `copy_` epilogue that functionalization generates.

Brings `python benchmarks/dynamo/torchbench.py  --performance  --backend inductor --amp --inference --only hf_Bert` from 1.46 -> 1.49

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100747
Approved by: https://github.com/jansel
2023-05-09 22:36:57 +00:00
7da8705f18 [dynamo 3.11] fix segfault when printing stack trace (#99934)
Dynamo will frequently segfault when attempting to print stack traces. We fix this by:
- Fixing stack size calculations, as we did not account for exception tables
- Creating shadow execution frames in a way that more closely resembles what CPython does to create its execution frames

Dynamo/inductor-wrapped pytorch tests are enabled up the stack - those need to be green before this PR can be merged.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/99934
Approved by: https://github.com/albanD, https://github.com/malfet, https://github.com/jansel
2023-05-09 22:12:45 +00:00
d57544d39a Revert "fix specify_constraints's signature when exporting model (#100739)"
This reverts commit b0a372e1faef97adf46bab08510c7e0abdff2611.

Reverted https://github.com/pytorch/pytorch/pull/100739 on behalf of https://github.com/jeanschmidt due to breaking internal builds ([comment](https://github.com/pytorch/pytorch/pull/100739#issuecomment-1540920698))
2023-05-09 21:42:35 +00:00
4b8127b90e Revert "[Dynamo] Fix nested function resume execution (#100426)"
This reverts commit d719f0276d69a8315b65f4c4500cfc1cdaddb025.

Reverted https://github.com/pytorch/pytorch/pull/100426 on behalf of https://github.com/jeanschmidt due to breaking internal builds ([comment](https://github.com/pytorch/pytorch/pull/100426#issuecomment-1540915913))
2023-05-09 21:32:13 +00:00
fa6df34d30 [ET selective build] add kernel metadata section to selective_build.yaml (#100665)
Summary:
For each op, we have a List[List[dtype;dim-order]]:
  - the inner list contains the `dtype;dim-order` info for each arg if we have a Tensor/TensorList/OptionalTensorList
  - the outer list contains different occurances of dtype/dim-order combinations for that op in the program

Example:
```
et_kernel_metadata:
  aten::add.out:
    # A list of different dtype/dim-order combinations used in model
    - # Each contains the list of args of Tensor dtype and dim order if applicable
      - FLOAT;0,1
      - FLOAT;0,1
      - NON_TENSOR_ARG
      - FLOAT;0,1
      - FLOAT;0,1
    -
      - INT;0,1
      - INT;0,1
      - NON_TENSOR_ARG
      - INT;0,1
      - INT;0,1
  aten::mul.out:
    - - FLOAT;0,1
      - FLOAT;0,1
      - FLOAT;0,1
      - FLOAT;0,1
```

We don't have the arg name so far; we need to parse the schema (functions.yaml) to get that info.  We depend on the order of args from that file.

Test Plan: `buck run fbcode//executorch/codegen/tools:test_gen_oplist_real_model`

Differential Revision: D45551409

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100665
Approved by: https://github.com/larryliu0820
2023-05-09 21:30:01 +00:00
35834a405c Run C++ tests on CI with run_test.py (#99956)
After https://github.com/pytorch/pytorch/pull/99559, we can now run C++ test with `run_test.py`.  Although advance features such as `--import-slow-tests` and `--import-disabled-tests` won't work for now, there will still be a gain in reliability and performance as C++ can now be retried and run in parallel.

This covers all C++ tests in the CI including aten, libtorch, and Vulkan C++ tests across all platforms Linux, Windows, MacOS.

Notes:
* To support C++ test discovery, the env variable `CPP_TESTS_DIR` can be set to where the C++ test binaries is located
* Support pytest -k argument via run_test as this is used by pytest-cpp to replace `--gtest-filter`
* The XML output is in pytest format, but it's ok now because we don't have slow test or flaky test support for C++ test yet
* ~~I need to figure out why conftest.py doesn't work when I invoke pytest directly for C++ test, so `--sc` is not available for C++ tests at the moment.  Proper pytest plugin like stepwise works fine though.  I'll investigate and fix it in a separate PR~~ Found the cause, `conftest.py` is per directory and needs to be in any arbitrary directory that holds C++ test
* Two tests `test_api` and `test_tensorexpr` timed out on ASAN, I suspect that ASAN is now used on top of the python executable, which is slower than running native C++ code.  IMO, it's ok to run these tests as before on ASAN for now
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99956
Approved by: https://github.com/clee2000, https://github.com/ZainRizvi
2023-05-09 21:24:12 +00:00
a8c2cd1039 Add CUTLASS-based MM for structured sparse linear operator (#100485)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100485
Approved by: https://github.com/cpuhrsch
2023-05-09 21:05:15 +00:00
d63e0b1578 [optim] More cleanup and reorg of test_optim.py (#100917)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100917
Approved by: https://github.com/albanD
2023-05-09 21:03:15 +00:00
d0dab772df [BE][optim] Remove objects from being globals and comment to clarify (#100899)
What happened in this PR?

1. Added comments to clarify rosenbrock
2. Moved global objects to be within classes for better readability/grouping
3. Renamed dnn to cnn for consistency

This is the very first of the cleanup of test_optim.py

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100899
Approved by: https://github.com/albanD, https://github.com/Skylion007
2023-05-09 21:03:15 +00:00
e353013aa4 [Vulkan] Ensure non-zero divisors in Vulkan API Tests (#100909)
Summary:
This fixes flakiness of div_to_scalar_wrapped
See [here](b89f74aa35) for flakiness of div_to_scalar_wrapped

Test Plan:
On Devserver:
```
LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck run //xplat/caffe2:pt_vulkan_api_test_bin
```

On Mac:
```
buck run --target-platforms ovr_config//platform/macos:arm64-fbsource -c pt.vulkan_full_precision=1 //xplat/caffe2:pt_vulkan_api_test_binAppleMac\#macosx-arm64
```

To test that these changes fixed flakiness of div_to_scalar_wrapped, I ran the test 1000 times on devserver before the changes, and observed failures. Then ran it 1000 times after the changes and didn't observe any failures.

Reviewed By: SS-JIA

Differential Revision: D45670642

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100909
Approved by: https://github.com/SS-JIA
2023-05-09 20:55:33 +00:00
17fec516fe [Vulkan] Test conv2d after division (#100910)
Summary: This tests running a conv2d with clamp after dividing the input tensor by another tensor. Both tensors have number channels = 3 (i.e. not a multiple of 4) and therefore, the channel dimension was padded. Hence, we are testing our divide-by-zero fix (D44392406)

Test Plan:
```
buck run --target-platforms ovr_config//platform/macos:arm64-fbsource -c pt.vulkan_full_precision=1 //xplat/caffe2:pt_vulkan_api_test_binAppleMac\#macosx-arm64 -- --gtest_filter="VulkanAPITest.conv2d_clamp_after_div"
```

Reviewed By: SS-JIA

Differential Revision: D44550026

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100910
Approved by: https://github.com/SS-JIA
2023-05-09 20:30:59 +00:00
9035b6a651 Allow disable binary build jobs on CI (#100754)
Given the recent outage w.r.t. binary workflows running on CI, I want to close the gap between them and regular CI jobs.  The first part is to add the same filter step used by regular CI jobs so that oncalls can disable the job if need.

* Nightly runs are excluded as it includes the step to publish nightly binaries.  Allowing oncalls to disable this part requires more thoughts.  So this covers only CI binary build and test jobs
* As binary jobs doesn't have a concept of test matrix config which is a required parameter to the filter script, I use a pseudo input of test config default there

### Testing

* https://github.com/pytorch/pytorch/issues/100758.  The job is skipped in https://github.com/pytorch/pytorch/actions/runs/4911034089/jobs/8768782689
* https://github.com/pytorch/pytorch/issues/100759.  The job is skipped in https://github.com/pytorch/pytorch/actions/runs/4911033966/jobs/8768713669

Note that Windows binary jobs are not run in PR anymore after https://github.com/pytorch/pytorch/pull/100638, and MacOS binary jobs only run nightly.  So there are only Linux jobs left.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100754
Approved by: https://github.com/ZainRizvi
2023-05-09 20:01:00 +00:00
c3f3cb5b0f [quant][pt2e] Support conv bn fusion in convert step for QAT flow (#100442)
Summary:
This PR adds support for folding bn weights into conv for QAT flow, this is equivalent
to the QAT branch of `from_float` in eager mode quantized conv module: https://github.com/pytorch/pytorch/blob/main/torch/ao/nn/quantized/modules/conv.py#L223

Items that needs followup:
* there are some workaround I did because quantize_per_tensor is using float/int args and dynamo does not support these args, need to fix after we change the quantized model representation and also change these args to Tensor

Test Plan: buck2 test @//mode/opt //caffe2/test:quantization_pt2e -- --exact 'caffe2/test:quantization_pt2e - test_convert_qat_conv_bn_fusion (quantization.pt2e.test_quantize_pt2e.TestQuantizePT2E)'

Reviewed By: andrewor14

Differential Revision: D45344281

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100442
Approved by: https://github.com/kimishpatel
2023-05-09 19:43:51 +00:00
f92b3e1477 [MPS][BE] std::is_same::value -> std::is_same_v (#100975)
PyTorch is C++17 project, so let's use some C++17 features.

I.e. `s/std::is_same<X, Y>::value/std::is_same_v<X, Y>`
And use `if constexpr` in few places when this construct is used.

<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 7b7683f</samp>

> _We're sailing on the sea of code, we're making it more neat_
> _We're using `is_same_v` and `if constexpr` to keep it sweet_
> _We're refactoring the range tensor logic, we're avoiding duplication_
> _We're heaving on the ropes of `Distributions.mm`, on the count of three, with elation_

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100975
Approved by: https://github.com/jeanschmidt, https://github.com/albanD, https://github.com/kulinseth, https://github.com/Skylion007
2023-05-09 19:27:28 +00:00
858657090b Make sure we get full file path for filtering in pr-sanity-check (#100978)
The filename get a `.../` path which makes the next diff not work for files that are too nested.
This can seen in https://github.com/pytorch/pytorch/actions/runs/4920598180/jobs/8789553971?pr=100583 for example where most files are ignored.

The detection properly works after this change.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100978
Approved by: https://github.com/seemethere
2023-05-09 18:42:42 +00:00
5970fb402e C++ CustomClass in Python: indicate which methods are not implemented (#100171)
Without these changes, it can be hard to know which magic methods are not implemented on a given ScriptObject.

before:
```py
torch.ops.load_library("somelib.so")
c = torch.classes.somelib.SomeClass()
print(len(c))
# raise NotImplementedError
```

after:
```py
torch.ops.load_library("somelib.so")
c = torch.classes.somelib.SomeClass()
print(len(c))
# raise NotImplementedError: '__len__' is not implemented for __torch__.torch.classes.somelib.SomeClass
```

------

I could not find a linked issue, if you want me to open one as well I can do this.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100171
Approved by: https://github.com/ezyang
2023-05-09 18:41:40 +00:00
0073d4cd27 Update FBGEMM submodule (#100236)
To [pytorch/FBGEMM@d0ee798](d0ee798b1f) that among other things includes [pytorch/FBGEMM#1672](https://github.com/pytorch/FBGEMM/pull/1672)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100236
Approved by: https://github.com/ezyang
2023-05-09 18:39:28 +00:00
d98d95fb9f Revert "[Dynamo] Remove cross import in dynamo unit tests (#100851)"
This reverts commit c4bbeb5b8a27259fc2b644e3f185b4ba859a2d39.

Reverted https://github.com/pytorch/pytorch/pull/100851 on behalf of https://github.com/jeanschmidt due to breaking internal builds ([comment](https://github.com/pytorch/pytorch/pull/100851#issuecomment-1540646623))
2023-05-09 18:30:01 +00:00
6aa80beca1 [c10d] Implement new Store methods in TCPStore. (#100383)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100383
Approved by: https://github.com/fduwjj
2023-05-09 17:43:16 +00:00
8769fb854d [BE] Fix flake8 B027 errors - missing abstractmethod decorator (#100715)
Enables B027 and applies fixes by adding abstract method decorators. Autofix generated by ruff master.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100715
Approved by: https://github.com/ezyang
2023-05-09 17:28:48 +00:00
bd18225c04 [functorch] Remove internal assert in index_put batch rule (#100516)
Fixes #94630

Context: https://github.com/pytorch/pytorch/issues/94630#issuecomment-1518946929

I'm not sure how to correctly test it using pure `vmap` without joining `jacrev` here.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100516
Approved by: https://github.com/zou3519
2023-05-09 17:23:26 +00:00
19be2bb875 Revert "[MPS] Add support for Custom Kernels (#100661)"
This reverts commit f39cda83d133cdd92e06e3d8cdd91340b43eb2c2.

Reverted https://github.com/pytorch/pytorch/pull/100661 on behalf of https://github.com/malfet due to Break internal builds, but also guarding dispatch_t define behind __OBJC__ guard is not a good practices ([comment](https://github.com/pytorch/pytorch/pull/100661#issuecomment-1540540002))
2023-05-09 17:02:04 +00:00
f558af2a55 [adam] Use the right params in weight_decay, rename for clarity, fixes #100707 (#100973)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100973
Approved by: https://github.com/Skylion007, https://github.com/albanD
2023-05-09 17:00:27 +00:00
ba47a2b227 [export] Pickle of ExportGraphModule (#100924)
try 2 of reland of https://github.com/pytorch/pytorch/pull/100620 bc merge conflict 😭...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100924
Approved by: https://github.com/tugsbayasgalan
2023-05-09 16:58:24 +00:00
b71ec6bdf3 Revert "Forward fix lint failure from #100661 (#100907)"
This reverts commit fb69aa15921895a21fe8bd9b1b7807f3d4c1cbe3.

Reverted https://github.com/pytorch/pytorch/pull/100907 on behalf of https://github.com/jeanschmidt due to Required in order to revert #100661 ([comment](https://github.com/pytorch/pytorch/pull/100907#issuecomment-1540504748))
2023-05-09 16:55:20 +00:00
0e08a9b057 Wrap more constraint violation cases to UserError (#100897)
Cases covered in this PR:
 - Example inputs conflict with input constraints
 - Example inputs conflict with inline constraints
 - Suggest users to use `constrain_as_*()` when trying to export with data-dependent operations

Differential Revision: [D45666627](https://www.internalfb.com/diff/D45666627)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100897
Approved by: https://github.com/avikchaudhuri
2023-05-09 16:44:57 +00:00
b179d34a19 Handle negative padding in reflect_pad_backward (#100923)
Fixes #100793

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100923
Approved by: https://github.com/jansel
2023-05-09 16:30:48 +00:00
92a7640b76 Add mul tests with sparse sample inputs (#100393)
This PR implements sparse sample inputs and error inputs for mul OpInfo.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100393
Approved by: https://github.com/amjames, https://github.com/cpuhrsch
2023-05-09 16:13:14 +00:00
0141a242fd bsr_dense_bmm(): remove sparse_rowspace kernel and some dead code (#100876)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100876
Approved by: https://github.com/cpuhrsch, https://github.com/Skylion007
2023-05-09 16:12:11 +00:00
793bd6993a Work around torchdynamo import error with functional collectives (#100901)
Summary:
Currently there are build configs where the torchdynamo import trips over a
strange SystemError related to some module's __dict__.items() returning NULL,
while torchdynamo tries to iterate all torch modules and process them for
its allowed functions list.

While this is hard to repro, we should be able to work around it and then fix
it properly.

Test Plan: Rely on others to test this, assuming CI passes.

Reviewed By: anijain2305

Differential Revision: D45663313

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100901
Approved by: https://github.com/yanboliang, https://github.com/malfet
2023-05-09 16:09:42 +00:00
93aac15d82 make torch/csrc/jit/backends/coreml/objc/PTMCoreMLFeatureProvider.mm data_ptr-correct (#100886)
make torch/csrc/jit/backends/coreml/objc/PTMCoreMLFeatureProvider.mm data_ptr-correct

Summary:
https://developer.apple.com/documentation/coreml/mlmultiarray shows
that this is looking for a mutable input and is permitted to mutate
the data in subsequent operations.

Test Plan: Rely on CI.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100886
Approved by: https://github.com/Skylion007
2023-05-09 15:35:48 +00:00
c5d7226ab9 Upgrade torchbench pin (#100937)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100937
Approved by: https://github.com/albanD
2023-05-09 15:34:27 +00:00
1ea224c2a4 make torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp data_ptr-correct (#100888)
make torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp data_ptr-correct

Test Plan: Rely on CI.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100888
Approved by: https://github.com/ezyang
2023-05-09 15:29:08 +00:00
bc3108c2e2 make torch/csrc/jit/runtime/register_prim_ops.cpp data_ptr-correct (#100832)
make torch/csrc/jit/runtime/register_prim_ops.cpp data_ptr-correct

Test Plan: Rely on CI.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100832
Approved by: https://github.com/ezyang
2023-05-09 15:07:54 +00:00