Skip to content

Conversation

@kurtamohler
Copy link
Collaborator

@kurtamohler kurtamohler commented Jan 5, 2022

This PR uses the OptionalArrayRef template class that was drafted in #64084.

Fixes #44409

@pytorch-probot
Copy link

pytorch-probot bot commented Jan 5, 2022

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/kurtamohler/pytorch/blob/6db22344a175253012fa7590a007d49ca2967eac/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
linux-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-manywheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
linux-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/trunk, ciflow/xla ✅ triggered
linux-docs ciflow/all, ciflow/cpu, ciflow/default, ciflow/docs, ciflow/linux, ciflow/trunk ✅ triggered
linux-vulkan-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-build ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-static ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7-no-ops ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
Skipped Workflows
caffe2-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
docker-builds ciflow/all, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-custom-ops ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-full-jit ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64-metal ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-full-jit ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda10.2-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow, ciflow/trunk 🚫 skipped
linux-bionic-rocm4.5-py3.7 ciflow/all, ciflow/linux, ciflow/rocm, ciflow/trunk 🚫 skipped
linux-docs-push ciflow/all, ciflow/cpu, ciflow/linux, ciflow/scheduled 🚫 skipped
linux-xenial-cuda11.3-py3.7-gcc7-no-ops ciflow/all, ciflow/cuda, ciflow/linux, ciflow/trunk 🚫 skipped
macos-10-15-py3-arm64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-10-15-py3-lite-interpreter-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-11-py3-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
parallelnative-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
periodic-libtorch-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled, ciflow/slow, ciflow/slow-gradcheck 🚫 skipped
periodic-linux-xenial-cuda11.1-py3.7-gcc7-debug ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
periodic-win-vs2019-cuda11.5-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-build ciflow/all, ciflow/android, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped

You can add a comment to the PR and tag @pytorchbot with the following commands:
# ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun

# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow

For more information, please take a look at the CI Flow Wiki.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 5, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 005ad76 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jan 5, 2022
@kurtamohler kurtamohler changed the title Resolve int[]? arguments to new OptionalIntArrayRef class Resolve int[]? dim arguments to new OptionalIntArrayRef class Jan 5, 2022
Comment on lines 605 to 608
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think OptionalArrayRef<T> makes sense for all types, not just int. e.g. a float[]? called with an int would likely have the exact same dangling pointer issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. Alright, I'll focus on fixing the remaining issues with int[]? --> OptionalIntArrayRef, and after that's fully working, I'll generalize for all OptionalArrayRef<T>

@kurtamohler kurtamohler force-pushed the dim-list-schema branch 2 times, most recently from 3ec8494 to c4f5afd Compare January 14, 2022 17:32
@kurtamohler kurtamohler force-pushed the dim-list-schema branch 4 times, most recently from ce8d647 to 6db2234 Compare January 21, 2022 02:11
Copy link
Collaborator Author

@kurtamohler kurtamohler Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes I made to this file are kind of a hacky workaround. The upsample functions, not just upsample_nearest2d, have two different overloads that the parser checks for in the corresponding THPVariable_* function in torch/csrc/autograd/generated/python_nn_functions.cpp. For upsample_nearest2d, this used to be how the parser was defined before this PR:

  static PythonArgParser parser({
    "upsample_nearest2d(Tensor input, IntArrayRef? output_size, ArrayRef<double>? scale_factors)",
    "upsample_nearest2d(Tensor input, IntArrayRef[2] output_size, double? scales_h=None, double? scales_w=None, *, Tensor out=None)",
  }, /*traceable=*/true);

If upsample_nearest2d is called with just the input and output_size, and no other arguments, both of the function schemas are a match, but the parser checks them in order, so the first one would be chosen. That worked fine until this PR changed IntArrayRef? to OptionalIntArrayRef. These entries are sorted in alphabetical order, so now they are switched:

  static PythonArgParser parser({
    "upsample_nearest2d(Tensor input, IntArrayRef[2] output_size, double? scales_h=None, double? scales_w=None, *, Tensor out=None)",
    "upsample_nearest2d(Tensor input, OptionalIntArrayRef output_size, ArrayRef<double>? scale_factors)",
  }, /*traceable=*/true); 

And now the wrong overload is chosen. The one with scales_h and scales_w is an old overload that still exists for BC, and it doesn't have all the features that the newer overload has.

One of the missing features was support for this NNAPI serializer. The change I made in this file adds support for that, and it seems to be working. It looks like upsample_nearest2d was the only upsample function that was supported here.

However, there's at least one more missing feature that won't be so simple (nor advisable, probably?) to add for these old overloads--forward AD. At the moment, all of the upsample functions are failing forward AD tests because of the overload reordering. If I could just change the order back to what it used to be, the issue should be fixed, but at the moment, I'm not completely sure how to do that. We could add specialized logic in codegen to reorder the upsample functions, but I'm not too sure if that's the best way to go or not. I haven't thought of any better idea though.

We could create THPVariable_ functions manually in tools/autograd/templates/python_nn_functions.cpp, but there are quite a few upsample functions affected by this:

  • THPVariable_upsample_bicubic2d
  • THPVariable_upsample_bilinear2d
  • THPVariable_upsample_linear1d
  • THPVariable_upsample_nearest1d
  • THPVariable_upsample_nearest2d
  • THPVariable_upsample_nearest3d
  • THPVariable_upsample_trilinear3d

@peterbell10 or @mruberry, do you have any thoughts?

Copy link
Collaborator Author

@kurtamohler kurtamohler Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried the codegen reordering idea, and it seems to work. I just reversed the grouped_overloads within the method_impl() function in tools/autograd/gen_python_functions.py any time it sees an upsample function:

It looks like there already are some special-cased comparisons in the sorting function here:

So I guess it might not be a bad idea to just add some logic there to prioritize OptionalIntArrayRef over IntArrayRef, or something like that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all ambiguous overloads should behave equivalently; so I would consider this a bug in the nnapi code. The scales_h overload even looks to be the main overload in ATen, the other one just wraps it.

Also, while I just said it shouldn't matter. IntArrayRef is a more specific overload than OptionalIntArrayRef so it seems backwards to sort the Optional version first.

Copy link
Collaborator Author

@kurtamohler kurtamohler Jan 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a fair point. Then I guess we should enable forward AD for theIntArrayRef overloads?

Edit: I didn't realize how simple it is to add forward AD support for these--just needed to add result: auto_linear to each of them in derivatives.yaml. So I'll go ahead and push it

@kurtamohler kurtamohler force-pushed the dim-list-schema branch 2 times, most recently from d4ef2fb to ad61f38 Compare January 25, 2022 21:31
@kurtamohler kurtamohler changed the title Resolve int[]? dim arguments to new OptionalIntArrayRef class Resolve int[]? arguments to new OptionalIntArrayRef class Jan 25, 2022
@kurtamohler kurtamohler force-pushed the dim-list-schema branch 2 times, most recently from b96cc6e to 8f636f5 Compare January 25, 2022 22:11
@kurtamohler kurtamohler marked this pull request as ready for review January 26, 2022 17:18
@lezcano lezcano removed their request for review January 26, 2022 17:51
pytorchmergebot pushed a commit that referenced this pull request Sep 14, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 14, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 14, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 30231b8

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
swolchok added a commit that referenced this pull request Nov 11, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 207227009

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
swolchok added a commit that referenced this pull request Nov 11, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 11, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 13, 2023
…:optional to std::optional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 13, 2023
…::optional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 207417170

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
swolchok added a commit that referenced this pull request Nov 14, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 207509669

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
swolchok added a commit that referenced this pull request Nov 14, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 14, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 207558686

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
swolchok added a commit that referenced this pull request Nov 28, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 28, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 29, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 29, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Nov 29, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: 208581191

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
pytorchmergebot pushed a commit that referenced this pull request Nov 30, 2023
Pull Request resolved: #101995

We have C++17 now!

I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway.
ghstack-source-id: be773c9

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
pytorchmergebot pushed a commit that referenced this pull request Nov 30, 2023
…ptional"


We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Nov 30, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Nov 30, 2023
We have C++17 now!

I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.

Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)

Pull Request resolved: #101995
Approved by: https://github.com/malfet, https://github.com/Skylion007, https://github.com/ezyang
dmenig pushed a commit to dmenig/pytorch that referenced this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed module: internals Related to internal abstractions in c10 and ATen oncall: jit Add this issue/PR to JIT oncall triage queue open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new schema type for representing dimension lists

9 participants