Skip to content

Conversation

killeent
Copy link
Contributor

Addresses #2404.

NumPy allows you to specify ndim + 1 indexers if one of them is an Ellipsis, which is basically tossed away. This PR extends such logic to PyTorch advanced indexing.

bool ellipsisFound = false;
Py_ssize_t lastSeqDim = -1;

// Note that we can have ndim + 1 Tensors in the case where we have an ellipsis,

This comment was marked as off-topic.

@soumith
Copy link
Member

soumith commented Aug 31, 2017

same for this PR, why is this PR against v0.2.0? Make it to be against master.

@killeent
Copy link
Contributor Author

Closing in favor of #2589.

@killeent killeent closed this Aug 31, 2017
houseroad added a commit to houseroad/pytorch that referenced this pull request Feb 26, 2020
…179174

Summary:
Previous import was 04a29addfd5b912812addb8dea5f8763fbfaad01

Included changes:
- **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (pytorch#2323) <Jonny Shipton>
- **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (pytorch#2532) <Jonny Shipton>
- **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (pytorch#2606) <Jeremy Cochoy>
- **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (pytorch#2117) <Takeshi Watanabe>
- **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (pytorch#2380) <Bowen Bao>
- **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (pytorch#2422) <Takeshi Watanabe>
- **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue pytorch#2436 (pytorch#2447) <daquexian>
- **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (pytorch#2608) <Jonny Shipton>
- **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (pytorch#2615) <G. Ramalingam>
- **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (pytorch#2607) <Jonny Shipton>
- **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (pytorch#2620) <Shinichiro Hamaji>
- **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (pytorch#2573) <Ksenija Stanojevic>
- **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (pytorch#2585) <wezuo>
- **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (pytorch#2570) <Ksenija Stanojevic>
- **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (pytorch#2588) <Ewa Tusień>
- **[3368834c](onnx/onnx@3368834c)**: adding version update content. (pytorch#2609) <Ke Zhang>
- **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (pytorch#2578) <Negin Raoof>
- **[807c62cf](onnx/onnx@807c62cf)**: Training Proposal: Spec Changes and Gradient Operator (pytorch#2314) <Wei-Sheng Chin>
- **[9fdae4c6](onnx/onnx@9fdae4c6)**: Copy sizes in some optimizers to remain shape information (pytorch#2574) <daquexian>
- **[c978d102](onnx/onnx@c978d102)**: Implement CELU node as a Function (pytorch#2575) <Jeremy Cochoy>
- **[c677aef4](onnx/onnx@c677aef4)**: Fix CI build break (pytorch#2603) <Changming Sun>
- **[d343755d](onnx/onnx@d343755d)**: Allow function body to rely on other operator sets (pytorch#2597) <Ke Zhang>

Test Plan: ci

Differential Revision: D20124936

fbshipit-source-id: 5cd5a6a155a5ab59f7bb86337fca314b2dcb8364
houseroad added a commit to houseroad/pytorch that referenced this pull request May 9, 2020
…40c18b (pytorch#38106)

Summary:
Pull Request resolved: pytorch#38106

Previous import was 807c62cf7e4c96ce49040bcf073b7e4a054f28a5

Included changes:
- **[79a7e0df](onnx/onnx@79a7e0df)**: Fix copy paste error of Min op test case (pytorch#2640) <Takeshi Watanabe>
- **[4cd2538d](onnx/onnx@4cd2538d)**: Add a release pipeline for Windows python packages (pytorch#2632) <Changming Sun>
- **[e8b33a5a](onnx/onnx@e8b33a5a)**: Adding UnfoldToDepth op [1.7 Release] (pytorch#2616) <Negin Raoof>
- **[c2a8d525](onnx/onnx@c2a8d525)**: update docs (pytorch#2627) <Ksenija Stanojevic>
- **[22752354](onnx/onnx@22752354)**: Generate tests for MeanSquareDistance and SoftmaxCrossEntropyLoss (pytorch#2623) <Jonny Shipton>
- **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (pytorch#2323) <Jonny Shipton>
- **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (pytorch#2532) <Jonny Shipton>
- **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (pytorch#2606) <Jeremy Cochoy>
- **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (pytorch#2117) <Takeshi Watanabe>
- **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (pytorch#2380) <Bowen Bao>
- **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (pytorch#2422) <Takeshi Watanabe>
- **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue pytorch#2436 (pytorch#2447) <daquexian>
- **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (pytorch#2608) <Jonny Shipton>
- **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (pytorch#2615) <G. Ramalingam>
- **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (pytorch#2607) <Jonny Shipton>
- **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (pytorch#2620) <Shinichiro Hamaji>
- **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (pytorch#2573) <Ksenija Stanojevic>
- **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (pytorch#2585) <wezuo>
- **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (pytorch#2570) <Ksenija Stanojevic>
- **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (pytorch#2588) <Ewa Tusień>
- **[3368834c](onnx/onnx@3368834c)**: adding version update content. (pytorch#2609) <Ke Zhang>
- **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (pytorch#2578) <Negin Raoof>

Test Plan: ci

Reviewed By: hl475

Differential Revision: D21471424

fbshipit-source-id: 1c9f4291bb1816cc6741ae84d4260d81a1d525bf
facebook-github-bot pushed a commit that referenced this pull request May 9, 2020
…40c18b (#38106)

Summary:
Pull Request resolved: #38106

Previous import was 807c62cf7e4c96ce49040bcf073b7e4a054f28a5

Included changes:
- **[79a7e0df](onnx/onnx@79a7e0df)**: Fix copy paste error of Min op test case (#2640) <Takeshi Watanabe>
- **[4cd2538d](onnx/onnx@4cd2538d)**: Add a release pipeline for Windows python packages (#2632) <Changming Sun>
- **[e8b33a5a](onnx/onnx@e8b33a5a)**: Adding UnfoldToDepth op [1.7 Release] (#2616) <Negin Raoof>
- **[c2a8d525](onnx/onnx@c2a8d525)**: update docs (#2627) <Ksenija Stanojevic>
- **[22752354](onnx/onnx@22752354)**: Generate tests for MeanSquareDistance and SoftmaxCrossEntropyLoss (#2623) <Jonny Shipton>
- **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (#2323) <Jonny Shipton>
- **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (#2532) <Jonny Shipton>
- **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (#2606) <Jeremy Cochoy>
- **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (#2117) <Takeshi Watanabe>
- **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (#2380) <Bowen Bao>
- **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (#2422) <Takeshi Watanabe>
- **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue #2436 (#2447) <daquexian>
- **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (#2608) <Jonny Shipton>
- **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (#2615) <G. Ramalingam>
- **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (#2607) <Jonny Shipton>
- **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (#2620) <Shinichiro Hamaji>
- **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (#2573) <Ksenija Stanojevic>
- **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (#2585) <wezuo>
- **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (#2570) <Ksenija Stanojevic>
- **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (#2588) <Ewa Tusień>
- **[3368834c](onnx/onnx@3368834c)**: adding version update content. (#2609) <Ke Zhang>
- **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (#2578) <Negin Raoof>

Test Plan: ci

Reviewed By: hl475

Differential Revision: D21471424

fbshipit-source-id: 5009a5f9558458a0aba56b2a9e8fffc3895a9e02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants