From aed71885cd9d9d89cad07d9b9fba45dc43437a75 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Wed, 9 Mar 2022 11:29:43 -0800 Subject: [PATCH] [GHF][BE] Add match_rules test Also, mark gql_mocks as autogenerated and save them in pretty format Pull Request resolved: https://github.com/pytorch/pytorch/pull/73975 Approved by: https://github.com/suo, https://github.com/seemethere --- .gitattributes | 1 + .github/scripts/gql_mocks.json | 1039 +++++++++++++++++++++++++++++- .github/scripts/test_trymerge.py | 14 +- 3 files changed, 1051 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 70246abe9bbbaf..d87495166e5c2b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ .circleci/config.yml linguist-generated=true .github/workflows/generated-*.yml linguist-generated=true .github/generated-* linguist-generated=true +.github/scripts/gql_mocks.json linguist-generated=true diff --git a/.github/scripts/gql_mocks.json b/.github/scripts/gql_mocks.json index 16c563eced73c5..cf5dbd739996c2 100644 --- a/.github/scripts/gql_mocks.json +++ b/.github/scripts/gql_mocks.json @@ -1 +1,1038 @@ -{"query_sha=fea7527b55661c30013cf0ce69b664e4ffe28199ce44b9af994c72288bde5fa0 name=pytorch number=71759 owner=pytorch": {"data": {"repository": {"pullRequest": {"closed": true, "isCrossRepository": true, "author": {"login": "coolteemf"}, "title": "Optimize grid sample 3d", "body": "Fixes #71415\r\nI have implemented the changes that replicate what @to-mi did in this [PR](https://github.com/pytorch/pytorch/pull/65986#issue-1012959443) for the 3D case :\r\n\r\n> Fixes #64977\r\n> \r\n> Avoids creating a tensor for and calculating `input` gradient if it's not needed in the backward pass of `grid_sample` (2d case, native CPU & CUDA kernels). Especially the tensor creation seemed time consuming (see #64977).\r\n> \r\n> Brief description of the changes:\r\n> \r\n> * I have tried to go with rather minimal changes. It would probably be possible to make a more elegant version with a bit larger refactoring (or possibly with better understanding of PyTorch internals and C++ functionalities).\r\n> \r\n> * Changed the `native_functions.yaml` and `derivatives.yaml` so that the gradient input mask is passed to the functions.\r\n> \r\n> * Changed the CPU kernels:\r\n> (1) added `bool input_requires_grad` template parameter to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorAccessor* gInp_slice_ptr` instead of `TensorAccessor& gInp_slice` so that I can pass a `nullptr` in case gradient for `input` is not requested. (A bit inelegant perhaps, but allows to keep one signature for `backward` function and not require breaking it to smaller pieces. Perhaps there's a more elegant way to achieve this?)\r\n> \r\n> * Changed CUDA kernel:\r\n> (1) added ~`bool input_requires_grad` template parameter~ `const bool input_requires_grad` argument to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorInfo()` instead of `getTensorInfo(grad_input)` in case gradient for `input` is not requested.\r\n> \r\n> * Modified tests in `test/test_nn.py` so that they run also cases with no `input` gradient needed.\r\n> \r\n> * Have not touched the CPU fallback kernel.\r\n\r\nNote: the changes number (3) are N/A in this case.\r\n\r\n", "headRefName": "optimize_grid_sample_3d", "headRepository": {"nameWithOwner": "coolteemf/pytorch"}, "baseRefName": "master", "baseRepository": {"nameWithOwner": "pytorch/pytorch", "isPrivate": false, "defaultBranchRef": {"name": "master"}}, "mergeCommit": null, "commits": {"nodes": [{"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "e0b0d1e695aeddceaf265da602c4704592053e9e", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "563ec73747ad53b63b36736c47c4342f962c2a09", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "51abe41a132d9dd5b1c0551bdca902aacc028ff8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "be9898205992034a00e8ace8a55c2ecdcee2c2f8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "2929c60b64384c2deae0f7dea8bab94ad4bc9ec8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "9241b737e7e2b257905cc74ad9c50b737d7f9d0a", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "64d6b795d0636928a8aa2fd3da01302fb5f5f7af", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "4503577e53760a0006f1e80ca6bfe04d2be90470", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "b16f4b11ffbbbf2ca2098f9702af4ef6b6fc5e1f", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "7ffc23368a604afdc92d2818747f730ce31a2bb5", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "b85292604b9ad6c31706b76b5a5498c4f6d94309", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "9d81d7bae8ad91aaa24b3ceab83e3138894dbc69", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "e79f6a2202512b294c55bf4bfb2e0524fafd4c48", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "f683e8aec7aea76097a264eec01511e704c31154", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": {"login": "coolteemf"}, "email": "67541941+coolteemf@users.noreply.github.com", "name": "Fran\u00e7ois Lecomte"}, "oid": "b932e9e286c22aaf352375186df851ef060b295a", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "ghp_XXXXXX", "name": "coolteemf"}, "oid": "346e0c547953d98eb84d23c1391a95badb9c4a22", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}], "totalCount": 16}, "changedFiles": 9, "files": {"nodes": [{"path": "aten/src/ATen/native/GridSampler.cpp"}, {"path": "aten/src/ATen/native/cpu/GridSamplerKernel.cpp"}, {"path": "aten/src/ATen/native/cuda/GridSampler.cpp"}, {"path": "aten/src/ATen/native/cuda/GridSampler.cu"}, {"path": "aten/src/ATen/native/cuda/GridSampler.h"}, {"path": "aten/src/ATen/native/native_functions.yaml"}, {"path": "test/forward_backward_compatibility/check_forward_backward_compatibility.py"}, {"path": "test/test_nn.py"}, {"path": "tools/autograd/derivatives.yaml"}]}, "reviews": {"nodes": [{"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "APPROVED"}, {"author": {"login": "albanD"}, "state": "APPROVED"}], "totalCount": 17}, "comments": {"nodes": [{"bodyText": "Hey @coolteemf.\nYou've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.\nFor changes that are 'topic: not user facing' there is no need for a release notes label.", "author": {"login": "github-actions"}, "authorAssociation": "NONE", "editor": null}]}}}}}, "query_sha=1847f597bd535a3d45a5751d69792ce57f4e565713118eee6057e5ee89e17997 name=pytorch number=71759 owner=pytorch": {"data": {"repository": {"pullRequest": {"closed": true, "isCrossRepository": true, "author": {"login": "coolteemf"}, "title": "Optimize grid sample 3d", "body": "Fixes #71415\r\nI have implemented the changes that replicate what @to-mi did in this [PR](https://github.com/pytorch/pytorch/pull/65986#issue-1012959443) for the 3D case :\r\n\r\n> Fixes #64977\r\n> \r\n> Avoids creating a tensor for and calculating `input` gradient if it's not needed in the backward pass of `grid_sample` (2d case, native CPU & CUDA kernels). Especially the tensor creation seemed time consuming (see #64977).\r\n> \r\n> Brief description of the changes:\r\n> \r\n> * I have tried to go with rather minimal changes. It would probably be possible to make a more elegant version with a bit larger refactoring (or possibly with better understanding of PyTorch internals and C++ functionalities).\r\n> \r\n> * Changed the `native_functions.yaml` and `derivatives.yaml` so that the gradient input mask is passed to the functions.\r\n> \r\n> * Changed the CPU kernels:\r\n> (1) added `bool input_requires_grad` template parameter to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorAccessor* gInp_slice_ptr` instead of `TensorAccessor& gInp_slice` so that I can pass a `nullptr` in case gradient for `input` is not requested. (A bit inelegant perhaps, but allows to keep one signature for `backward` function and not require breaking it to smaller pieces. Perhaps there's a more elegant way to achieve this?)\r\n> \r\n> * Changed CUDA kernel:\r\n> (1) added ~`bool input_requires_grad` template parameter~ `const bool input_requires_grad` argument to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorInfo()` instead of `getTensorInfo(grad_input)` in case gradient for `input` is not requested.\r\n> \r\n> * Modified tests in `test/test_nn.py` so that they run also cases with no `input` gradient needed.\r\n> \r\n> * Have not touched the CPU fallback kernel.\r\n\r\nNote: the changes number (3) are N/A in this case.\r\n\r\n", "headRefName": "optimize_grid_sample_3d", "headRepository": {"nameWithOwner": "coolteemf/pytorch"}, "baseRefName": "master", "baseRepository": {"nameWithOwner": "pytorch/pytorch", "isPrivate": false, "defaultBranchRef": {"name": "master"}}, "mergeCommit": null, "commits": {"nodes": [{"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "e0b0d1e695aeddceaf265da602c4704592053e9e", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "563ec73747ad53b63b36736c47c4342f962c2a09", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "51abe41a132d9dd5b1c0551bdca902aacc028ff8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "be9898205992034a00e8ace8a55c2ecdcee2c2f8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "2929c60b64384c2deae0f7dea8bab94ad4bc9ec8", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "9241b737e7e2b257905cc74ad9c50b737d7f9d0a", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "64d6b795d0636928a8aa2fd3da01302fb5f5f7af", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "4503577e53760a0006f1e80ca6bfe04d2be90470", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "b16f4b11ffbbbf2ca2098f9702af4ef6b6fc5e1f", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "7ffc23368a604afdc92d2818747f730ce31a2bb5", "checkSuites": {"nodes": []}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "b85292604b9ad6c31706b76b5a5498c4f6d94309", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "9d81d7bae8ad91aaa24b3ceab83e3138894dbc69", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "e79f6a2202512b294c55bf4bfb2e0524fafd4c48", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "f683e8aec7aea76097a264eec01511e704c31154", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": {"login": "coolteemf"}, "email": "67541941+coolteemf@users.noreply.github.com", "name": "Fran\u00e7ois Lecomte"}, "oid": "b932e9e286c22aaf352375186df851ef060b295a", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}, {"commit": {"author": {"user": null, "email": "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", "name": "coolteemf"}, "oid": "346e0c547953d98eb84d23c1391a95badb9c4a22", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}], "totalCount": 16}, "changedFiles": 9, "files": {"nodes": [{"path": "aten/src/ATen/native/GridSampler.cpp"}, {"path": "aten/src/ATen/native/cpu/GridSamplerKernel.cpp"}, {"path": "aten/src/ATen/native/cuda/GridSampler.cpp"}, {"path": "aten/src/ATen/native/cuda/GridSampler.cu"}, {"path": "aten/src/ATen/native/cuda/GridSampler.h"}, {"path": "aten/src/ATen/native/native_functions.yaml"}, {"path": "test/forward_backward_compatibility/check_forward_backward_compatibility.py"}, {"path": "test/test_nn.py"}, {"path": "tools/autograd/derivatives.yaml"}], "pageInfo": {"endCursor": "OQ", "hasNextPage": false}}, "reviews": {"nodes": [{"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "coolteemf"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "COMMENTED"}, {"author": {"login": "albanD"}, "state": "APPROVED"}, {"author": {"login": "albanD"}, "state": "APPROVED"}], "totalCount": 17}, "comments": {"nodes": [{"bodyText": "Hey @coolteemf.\nYou've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.\nFor changes that are 'topic: not user facing' there is no need for a release notes label.", "author": {"login": "github-actions"}, "authorAssociation": "NONE", "editor": null}]}}}}}, "query_sha=1847f597bd535a3d45a5751d69792ce57f4e565713118eee6057e5ee89e17997 name=pytorch number=73099 owner=pytorch": {"data": {"repository": {"pullRequest": {"closed": false, "isCrossRepository": false, "author": {"login": "BowenBao"}, "title": "[ONNX] Make graph name spec-compliant (#71961)", "body": "Stack from [ghstack](https://github.com/ezyang/ghstack):\n* #73104\n* #73103\n* #73102\n* #73101\n* #73100\n* __->__ #73099\n\n[According to the ONNX spec](https://github.com/onnx/onnx/blob/main/docs/IR.md#names-within-a-graph),\nall names must adhere to C90 identifier syntax rules, which means no\ndashes.\n\nFixes: #30952", "headRefName": "gh/BowenBao/138/head", "headRepository": {"nameWithOwner": "pytorch/pytorch"}, "baseRefName": "gh/BowenBao/138/base", "baseRepository": {"nameWithOwner": "pytorch/pytorch", "isPrivate": false, "defaultBranchRef": {"name": "master"}}, "mergeCommit": null, "commits": {"nodes": [{"commit": {"author": {"user": {"login": "BowenBao"}, "email": "bowbao@microsoft.com", "name": "BowenBao"}, "oid": "3038b939eb2069653305c419326a0f47d2598e39", "checkSuites": {"nodes": [{"app": {"databaseId": 12274}, "conclusion": "SUCCESS"}]}}}], "totalCount": 1}, "changedFiles": 162, "files": {"nodes": [{"path": "test/onnx/expect/TestOperators.test_acos.expect"}, {"path": "test/onnx/expect/TestOperators.test_add_broadcast.expect"}, {"path": "test/onnx/expect/TestOperators.test_add_left_broadcast.expect"}, {"path": "test/onnx/expect/TestOperators.test_add_size1_broadcast.expect"}, {"path": "test/onnx/expect/TestOperators.test_add_size1_right_broadcast.expect"}, {"path": "test/onnx/expect/TestOperators.test_add_size1_singleton_broadcast.expect"}, {"path": "test/onnx/expect/TestOperators.test_addconstant.expect"}, {"path": "test/onnx/expect/TestOperators.test_addmm.expect"}, {"path": "test/onnx/expect/TestOperators.test_arange_dynamic.expect"}, {"path": "test/onnx/expect/TestOperators.test_argmax.expect"}, {"path": "test/onnx/expect/TestOperators.test_asin.expect"}, {"path": "test/onnx/expect/TestOperators.test_at_op.expect"}, {"path": "test/onnx/expect/TestOperators.test_atan.expect"}, {"path": "test/onnx/expect/TestOperators.test_aten_embedding_1.expect"}, {"path": "test/onnx/expect/TestOperators.test_aten_embedding_2.expect"}, {"path": "test/onnx/expect/TestOperators.test_avg_pool2d.expect"}, {"path": "test/onnx/expect/TestOperators.test_baddbmm.expect"}, {"path": "test/onnx/expect/TestOperators.test_basic.expect"}, {"path": "test/onnx/expect/TestOperators.test_batchnorm.expect"}, {"path": "test/onnx/expect/TestOperators.test_batchnorm_1d.expect"}, {"path": "test/onnx/expect/TestOperators.test_batchnorm_noaffine.expect"}, {"path": "test/onnx/expect/TestOperators.test_batchnorm_onnx_irv4.expect"}, {"path": "test/onnx/expect/TestOperators.test_batchnorm_training.expect"}, {"path": "test/onnx/expect/TestOperators.test_bitshift.expect"}, {"path": "test/onnx/expect/TestOperators.test_c2_op.expect"}, {"path": "test/onnx/expect/TestOperators.test_chunk.expect"}, {"path": "test/onnx/expect/TestOperators.test_clip.expect"}, {"path": "test/onnx/expect/TestOperators.test_clip_max.expect"}, {"path": "test/onnx/expect/TestOperators.test_clip_min.expect"}, {"path": "test/onnx/expect/TestOperators.test_concat2.expect"}, {"path": "test/onnx/expect/TestOperators.test_conv.expect"}, {"path": "test/onnx/expect/TestOperators.test_conv_onnx_irv4.expect"}, {"path": "test/onnx/expect/TestOperators.test_conv_onnx_irv4_opset8.expect"}, {"path": "test/onnx/expect/TestOperators.test_convtranspose.expect"}, {"path": "test/onnx/expect/TestOperators.test_cos.expect"}, {"path": "test/onnx/expect/TestOperators.test_cumsum.expect"}, {"path": "test/onnx/expect/TestOperators.test_det.expect"}, {"path": "test/onnx/expect/TestOperators.test_dict.expect"}, {"path": "test/onnx/expect/TestOperators.test_dict_str.expect"}, {"path": "test/onnx/expect/TestOperators.test_dim.expect"}, {"path": "test/onnx/expect/TestOperators.test_dropout.expect"}, {"path": "test/onnx/expect/TestOperators.test_dropout_default.expect"}, {"path": "test/onnx/expect/TestOperators.test_dropout_opset12.expect"}, {"path": "test/onnx/expect/TestOperators.test_dropout_training.expect"}, {"path": "test/onnx/expect/TestOperators.test_dropout_training_opset12.expect"}, {"path": "test/onnx/expect/TestOperators.test_dynamic_axes_add.expect"}, {"path": "test/onnx/expect/TestOperators.test_dynamic_axes_add_inputs_same_symbolic_shape.expect"}, {"path": "test/onnx/expect/TestOperators.test_dynamic_axes_matmul.expect"}, {"path": "test/onnx/expect/TestOperators.test_dynamic_axes_reduce_mean.expect"}, {"path": "test/onnx/expect/TestOperators.test_dynamic_axes_unchange.expect"}, {"path": "test/onnx/expect/TestOperators.test_elu.expect"}, {"path": "test/onnx/expect/TestOperators.test_embedding_bags.expect"}, {"path": "test/onnx/expect/TestOperators.test_empty_like.expect"}, {"path": "test/onnx/expect/TestOperators.test_empty_like_opset7.expect"}, {"path": "test/onnx/expect/TestOperators.test_equal.expect"}, {"path": "test/onnx/expect/TestOperators.test_erf.expect"}, {"path": "test/onnx/expect/TestOperators.test_exp.expect"}, {"path": "test/onnx/expect/TestOperators.test_expand.expect"}, {"path": "test/onnx/expect/TestOperators.test_flatten.expect"}, {"path": "test/onnx/expect/TestOperators.test_flatten2D.expect"}, {"path": "test/onnx/expect/TestOperators.test_fmod.expect"}, {"path": "test/onnx/expect/TestOperators.test_frobenius_norm.expect"}, {"path": "test/onnx/expect/TestOperators.test_full.expect"}, {"path": "test/onnx/expect/TestOperators.test_full_like.expect"}, {"path": "test/onnx/expect/TestOperators.test_gather.expect"}, {"path": "test/onnx/expect/TestOperators.test_gather_opset11.expect"}, {"path": "test/onnx/expect/TestOperators.test_ge.expect"}, {"path": "test/onnx/expect/TestOperators.test_gelu.expect"}, {"path": "test/onnx/expect/TestOperators.test_gt.expect"}, {"path": "test/onnx/expect/TestOperators.test_hardtanh.expect"}, {"path": "test/onnx/expect/TestOperators.test_implicit_expand.expect"}, {"path": "test/onnx/expect/TestOperators.test_index.expect"}, {"path": "test/onnx/expect/TestOperators.test_isnan.expect"}, {"path": "test/onnx/expect/TestOperators.test_layer_norm_aten.expect"}, {"path": "test/onnx/expect/TestOperators.test_le.expect"}, {"path": "test/onnx/expect/TestOperators.test_linear.expect"}, {"path": "test/onnx/expect/TestOperators.test_log_sigmoid.expect"}, {"path": "test/onnx/expect/TestOperators.test_logsoftmax.expect"}, {"path": "test/onnx/expect/TestOperators.test_lstm_none_sequence_lens.expect"}, {"path": "test/onnx/expect/TestOperators.test_lt.expect"}, {"path": "test/onnx/expect/TestOperators.test_master_opset.expect"}, {"path": "test/onnx/expect/TestOperators.test_max.expect"}, {"path": "test/onnx/expect/TestOperators.test_maxpool.expect"}, {"path": "test/onnx/expect/TestOperators.test_maxpool_dilations.expect"}, {"path": "test/onnx/expect/TestOperators.test_maxpool_indices.expect"}, {"path": "test/onnx/expect/TestOperators.test_mean.expect"}, {"path": "test/onnx/expect/TestOperators.test_mean_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_meshgrid.expect"}, {"path": "test/onnx/expect/TestOperators.test_min.expect"}, {"path": "test/onnx/expect/TestOperators.test_mm.expect"}, {"path": "test/onnx/expect/TestOperators.test_narrow.expect"}, {"path": "test/onnx/expect/TestOperators.test_ne.expect"}, {"path": "test/onnx/expect/TestOperators.test_nonzero.expect"}, {"path": "test/onnx/expect/TestOperators.test_norm_p1.expect"}, {"path": "test/onnx/expect/TestOperators.test_norm_p2.expect"}, {"path": "test/onnx/expect/TestOperators.test_ones_like.expect"}, {"path": "test/onnx/expect/TestOperators.test_pad.expect"}, {"path": "test/onnx/expect/TestOperators.test_params.expect"}, {"path": "test/onnx/expect/TestOperators.test_params_onnx_irv4.expect"}, {"path": "test/onnx/expect/TestOperators.test_permute2.expect"}], "pageInfo": {"endCursor": "MTAw", "hasNextPage": true}}, "reviews": {"nodes": [{"author": {"login": "garymm"}, "state": "APPROVED"}], "totalCount": 1}, "comments": {"nodes": [{"bodyText": "@malfet Thank you for info. Sure, I have separated the rest of stack from this one, we'll wait for the fix to try again.", "author": {"login": "BowenBao"}, "authorAssociation": "COLLABORATOR", "editor": null}]}}}}}, "query_sha=0a34acb829d8aca9dd28a8ba388dfa52f6ecdde7e903ace1caabdcfaba87de98 cursor=MTAw name=pytorch number=73099 owner=pytorch": {"data": {"repository": {"pullRequest": {"files": {"nodes": [{"path": "test/onnx/expect/TestOperators.test_pixel_shuffle.expect"}, {"path": "test/onnx/expect/TestOperators.test_pow.expect"}, {"path": "test/onnx/expect/TestOperators.test_prelu.expect"}, {"path": "test/onnx/expect/TestOperators.test_prod.expect"}, {"path": "test/onnx/expect/TestOperators.test_prod_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_rand.expect"}, {"path": "test/onnx/expect/TestOperators.test_randn.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduce_sum_negative_indices.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_mean.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_mean_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_mean_keepdim.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_prod.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_prod_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_prod_keepdim.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_sum.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_sum_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_reduced_sum_keepdim.expect"}, {"path": "test/onnx/expect/TestOperators.test_reducemax.expect"}, {"path": "test/onnx/expect/TestOperators.test_reducemin.expect"}, {"path": "test/onnx/expect/TestOperators.test_remainder.expect"}, {"path": "test/onnx/expect/TestOperators.test_repeat.expect"}, {"path": "test/onnx/expect/TestOperators.test_repeat_dim_overflow.expect"}, {"path": "test/onnx/expect/TestOperators.test_round.expect"}, {"path": "test/onnx/expect/TestOperators.test_rrelu.expect"}, {"path": "test/onnx/expect/TestOperators.test_rsqrt.expect"}, {"path": "test/onnx/expect/TestOperators.test_rsub.expect"}, {"path": "test/onnx/expect/TestOperators.test_scatter_add.expect"}, {"path": "test/onnx/expect/TestOperators.test_scatter_add_opset11.expect"}, {"path": "test/onnx/expect/TestOperators.test_selu.expect"}, {"path": "test/onnx/expect/TestOperators.test_shape_value_map.expect"}, {"path": "test/onnx/expect/TestOperators.test_sign.expect"}, {"path": "test/onnx/expect/TestOperators.test_sin.expect"}, {"path": "test/onnx/expect/TestOperators.test_slice.expect"}, {"path": "test/onnx/expect/TestOperators.test_slice_dynamic.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_3d.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_3d_none.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_4d.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_ignore_index.expect"}, {"path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_weights.expect"}, {"path": "test/onnx/expect/TestOperators.test_split.expect"}, {"path": "test/onnx/expect/TestOperators.test_split_with_sizes.expect"}, {"path": "test/onnx/expect/TestOperators.test_sqrt.expect"}, {"path": "test/onnx/expect/TestOperators.test_std.expect"}, {"path": "test/onnx/expect/TestOperators.test_sum.expect"}, {"path": "test/onnx/expect/TestOperators.test_sum_dtype.expect"}, {"path": "test/onnx/expect/TestOperators.test_tan.expect"}, {"path": "test/onnx/expect/TestOperators.test_topk.expect"}, {"path": "test/onnx/expect/TestOperators.test_topk_smallest_unsorted.expect"}, {"path": "test/onnx/expect/TestOperators.test_transpose.expect"}, {"path": "test/onnx/expect/TestOperators.test_type_as.expect"}, {"path": "test/onnx/expect/TestOperators.test_unfold.expect"}, {"path": "test/onnx/expect/TestOperators.test_unique.expect"}, {"path": "test/onnx/expect/TestOperators.test_unsqueeze.expect"}, {"path": "test/onnx/expect/TestOperators.test_upsample_nearest_scale.expect"}, {"path": "test/onnx/expect/TestOperators.test_upsample_nearest_scale_default_scale_factor.expect"}, {"path": "test/onnx/expect/TestOperators.test_upsample_nearest_size.expect"}, {"path": "test/onnx/expect/TestOperators.test_view.expect"}, {"path": "test/onnx/expect/TestOperators.test_view_flatten.expect"}, {"path": "test/onnx/expect/TestOperators.test_zeros_like.expect"}, {"path": "torch/csrc/jit/serialization/export.cpp"}, {"path": "torch/csrc/jit/serialization/export.h"}], "pageInfo": {"endCursor": "MTYy", "hasNextPage": false}}}}}}} +{ + "query_sha=1847f597bd535a3d45a5751d69792ce57f4e565713118eee6057e5ee89e17997 name=pytorch number=71759 owner=pytorch": { + "data": { + "repository": { + "pullRequest": { + "closed": true, + "isCrossRepository": true, + "author": { + "login": "coolteemf" + }, + "title": "Optimize grid sample 3d", + "body": "Fixes #71415\r\nI have implemented the changes that replicate what @to-mi did in this [PR](https://github.com/pytorch/pytorch/pull/65986#issue-1012959443) for the 3D case :\r\n\r\n> Fixes #64977\r\n> \r\n> Avoids creating a tensor for and calculating `input` gradient if it's not needed in the backward pass of `grid_sample` (2d case, native CPU & CUDA kernels). Especially the tensor creation seemed time consuming (see #64977).\r\n> \r\n> Brief description of the changes:\r\n> \r\n> * I have tried to go with rather minimal changes. It would probably be possible to make a more elegant version with a bit larger refactoring (or possibly with better understanding of PyTorch internals and C++ functionalities).\r\n> \r\n> * Changed the `native_functions.yaml` and `derivatives.yaml` so that the gradient input mask is passed to the functions.\r\n> \r\n> * Changed the CPU kernels:\r\n> (1) added `bool input_requires_grad` template parameter to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorAccessor* gInp_slice_ptr` instead of `TensorAccessor& gInp_slice` so that I can pass a `nullptr` in case gradient for `input` is not requested. (A bit inelegant perhaps, but allows to keep one signature for `backward` function and not require breaking it to smaller pieces. Perhaps there's a more elegant way to achieve this?)\r\n> \r\n> * Changed CUDA kernel:\r\n> (1) added ~`bool input_requires_grad` template parameter~ `const bool input_requires_grad` argument to the `backward` function,\r\n> (2) added if branches based on it to remove `input` gradient computations if it's not requested,\r\n> (3) feed in `TensorInfo()` instead of `getTensorInfo(grad_input)` in case gradient for `input` is not requested.\r\n> \r\n> * Modified tests in `test/test_nn.py` so that they run also cases with no `input` gradient needed.\r\n> \r\n> * Have not touched the CPU fallback kernel.\r\n\r\nNote: the changes number (3) are N/A in this case.\r\n\r\n", + "headRefName": "optimize_grid_sample_3d", + "headRepository": { + "nameWithOwner": "coolteemf/pytorch" + }, + "baseRefName": "master", + "baseRepository": { + "nameWithOwner": "pytorch/pytorch", + "isPrivate": false, + "defaultBranchRef": { + "name": "master" + } + }, + "mergeCommit": null, + "commits": { + "nodes": [ + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "e0b0d1e695aeddceaf265da602c4704592053e9e", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "563ec73747ad53b63b36736c47c4342f962c2a09", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "51abe41a132d9dd5b1c0551bdca902aacc028ff8", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "be9898205992034a00e8ace8a55c2ecdcee2c2f8", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "2929c60b64384c2deae0f7dea8bab94ad4bc9ec8", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "9241b737e7e2b257905cc74ad9c50b737d7f9d0a", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "64d6b795d0636928a8aa2fd3da01302fb5f5f7af", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "4503577e53760a0006f1e80ca6bfe04d2be90470", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "b16f4b11ffbbbf2ca2098f9702af4ef6b6fc5e1f", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "7ffc23368a604afdc92d2818747f730ce31a2bb5", + "checkSuites": { + "nodes": [] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "b85292604b9ad6c31706b76b5a5498c4f6d94309", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "9d81d7bae8ad91aaa24b3ceab83e3138894dbc69", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "e79f6a2202512b294c55bf4bfb2e0524fafd4c48", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "f683e8aec7aea76097a264eec01511e704c31154", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": { + "login": "coolteemf" + }, + "email": "67541941+coolteemf@users.noreply.github.com", + "name": "Fran\u00e7ois Lecomte" + }, + "oid": "b932e9e286c22aaf352375186df851ef060b295a", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + }, + { + "commit": { + "author": { + "user": null, + "email": "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", + "name": "coolteemf" + }, + "oid": "346e0c547953d98eb84d23c1391a95badb9c4a22", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + } + ], + "totalCount": 16 + }, + "changedFiles": 9, + "files": { + "nodes": [ + { + "path": "aten/src/ATen/native/GridSampler.cpp" + }, + { + "path": "aten/src/ATen/native/cpu/GridSamplerKernel.cpp" + }, + { + "path": "aten/src/ATen/native/cuda/GridSampler.cpp" + }, + { + "path": "aten/src/ATen/native/cuda/GridSampler.cu" + }, + { + "path": "aten/src/ATen/native/cuda/GridSampler.h" + }, + { + "path": "aten/src/ATen/native/native_functions.yaml" + }, + { + "path": "test/forward_backward_compatibility/check_forward_backward_compatibility.py" + }, + { + "path": "test/test_nn.py" + }, + { + "path": "tools/autograd/derivatives.yaml" + } + ], + "pageInfo": { + "endCursor": "OQ", + "hasNextPage": false + } + }, + "reviews": { + "nodes": [ + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "coolteemf" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "COMMENTED" + }, + { + "author": { + "login": "albanD" + }, + "state": "APPROVED" + }, + { + "author": { + "login": "albanD" + }, + "state": "APPROVED" + } + ], + "totalCount": 17 + }, + "comments": { + "nodes": [ + { + "bodyText": "Hey @coolteemf.\nYou've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.\nFor changes that are 'topic: not user facing' there is no need for a release notes label.", + "author": { + "login": "github-actions" + }, + "authorAssociation": "NONE", + "editor": null + } + ] + } + } + } + } + }, + "query_sha=1847f597bd535a3d45a5751d69792ce57f4e565713118eee6057e5ee89e17997 name=pytorch number=73099 owner=pytorch": { + "data": { + "repository": { + "pullRequest": { + "closed": true, + "isCrossRepository": false, + "author": { + "login": "BowenBao" + }, + "title": "[ONNX] Make graph name spec-compliant (#71961)", + "body": "Stack from [ghstack](https://github.com/ezyang/ghstack):\n* #73104\n* #73103\n* #73102\n* #73101\n* #73100\n* __->__ #73099\n\n[According to the ONNX spec](https://github.com/onnx/onnx/blob/main/docs/IR.md#names-within-a-graph),\nall names must adhere to C90 identifier syntax rules, which means no\ndashes.\n\nFixes: #30952", + "headRefName": "gh/BowenBao/138/head", + "headRepository": { + "nameWithOwner": "pytorch/pytorch" + }, + "baseRefName": "gh/BowenBao/138/base", + "baseRepository": { + "nameWithOwner": "pytorch/pytorch", + "isPrivate": false, + "defaultBranchRef": { + "name": "master" + } + }, + "mergeCommit": null, + "commits": { + "nodes": [ + { + "commit": { + "author": { + "user": { + "login": "BowenBao" + }, + "email": "bowbao@microsoft.com", + "name": "BowenBao" + }, + "oid": "3038b939eb2069653305c419326a0f47d2598e39", + "checkSuites": { + "nodes": [ + { + "app": { + "databaseId": 12274 + }, + "conclusion": "SUCCESS" + } + ] + } + } + } + ], + "totalCount": 1 + }, + "changedFiles": 162, + "files": { + "nodes": [ + { + "path": "test/onnx/expect/TestOperators.test_acos.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_add_broadcast.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_add_left_broadcast.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_add_size1_broadcast.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_add_size1_right_broadcast.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_add_size1_singleton_broadcast.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_addconstant.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_addmm.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_arange_dynamic.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_argmax.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_asin.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_at_op.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_atan.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_aten_embedding_1.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_aten_embedding_2.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_avg_pool2d.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_baddbmm.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_basic.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_batchnorm.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_batchnorm_1d.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_batchnorm_noaffine.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_batchnorm_onnx_irv4.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_batchnorm_training.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_bitshift.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_c2_op.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_chunk.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_clip.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_clip_max.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_clip_min.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_concat2.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_conv.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_conv_onnx_irv4.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_conv_onnx_irv4_opset8.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_convtranspose.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_cos.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_cumsum.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_det.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dict.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dict_str.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dim.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dropout.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dropout_default.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dropout_opset12.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dropout_training.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dropout_training_opset12.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dynamic_axes_add.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dynamic_axes_add_inputs_same_symbolic_shape.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dynamic_axes_matmul.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dynamic_axes_reduce_mean.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_dynamic_axes_unchange.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_elu.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_embedding_bags.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_empty_like.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_empty_like_opset7.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_equal.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_erf.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_exp.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_expand.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_flatten.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_flatten2D.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_fmod.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_frobenius_norm.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_full.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_full_like.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_gather.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_gather_opset11.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_ge.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_gelu.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_gt.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_hardtanh.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_implicit_expand.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_index.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_isnan.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_layer_norm_aten.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_le.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_linear.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_log_sigmoid.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_logsoftmax.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_lstm_none_sequence_lens.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_lt.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_master_opset.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_max.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_maxpool.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_maxpool_dilations.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_maxpool_indices.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_mean.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_mean_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_meshgrid.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_min.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_mm.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_narrow.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_ne.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_nonzero.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_norm_p1.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_norm_p2.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_ones_like.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_pad.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_params.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_params_onnx_irv4.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_permute2.expect" + } + ], + "pageInfo": { + "endCursor": "MTAw", + "hasNextPage": true + } + }, + "reviews": { + "nodes": [ + { + "author": { + "login": "garymm" + }, + "state": "APPROVED" + } + ], + "totalCount": 1 + }, + "comments": { + "nodes": [ + { + "bodyText": "Hey @BowenBao.\nYou've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.\nFor changes that are 'topic: not user facing' there is no need for a release notes label.", + "author": { + "login": "github-actions" + }, + "authorAssociation": "NONE", + "editor": null + } + ] + } + } + } + } + }, + "query_sha=0a34acb829d8aca9dd28a8ba388dfa52f6ecdde7e903ace1caabdcfaba87de98 cursor=MTAw name=pytorch number=73099 owner=pytorch": { + "data": { + "repository": { + "pullRequest": { + "files": { + "nodes": [ + { + "path": "test/onnx/expect/TestOperators.test_pixel_shuffle.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_pow.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_prelu.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_prod.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_prod_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_rand.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_randn.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduce_sum_negative_indices.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_mean.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_mean_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_mean_keepdim.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_prod.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_prod_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_prod_keepdim.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_sum.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_sum_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reduced_sum_keepdim.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reducemax.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_reducemin.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_remainder.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_repeat.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_repeat_dim_overflow.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_round.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_rrelu.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_rsqrt.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_rsub.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_scatter_add.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_scatter_add_opset11.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_selu.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_shape_value_map.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_sign.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_sin.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_slice.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_slice_dynamic.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_3d.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_3d_none.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_4d.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_ignore_index.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_softmaxcrossentropy_weights.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_split.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_split_with_sizes.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_sqrt.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_std.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_sum.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_sum_dtype.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_tan.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_topk.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_topk_smallest_unsorted.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_transpose.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_type_as.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_unfold.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_unique.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_unsqueeze.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_upsample_nearest_scale.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_upsample_nearest_scale_default_scale_factor.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_upsample_nearest_size.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_view.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_view_flatten.expect" + }, + { + "path": "test/onnx/expect/TestOperators.test_zeros_like.expect" + }, + { + "path": "torch/csrc/jit/serialization/export.cpp" + }, + { + "path": "torch/csrc/jit/serialization/export.h" + } + ], + "pageInfo": { + "endCursor": "MTYy", + "hasNextPage": false + } + } + } + } + } + } +} diff --git a/.github/scripts/test_trymerge.py b/.github/scripts/test_trymerge.py index 539aec9b9c6933..28dbcdd603f4ba 100755 --- a/.github/scripts/test_trymerge.py +++ b/.github/scripts/test_trymerge.py @@ -2,7 +2,8 @@ import json import os from hashlib import sha256 -from trymerge import gh_graphql, GitHubPR +from trymerge import find_matching_merge_rule, gh_graphql, GitHubPR +from gitutils import get_git_remote_name, get_git_repo_dir, GitRepo from typing import Any from unittest import TestCase, main, mock @@ -17,7 +18,8 @@ def get_mocked_queries() -> Any: def save_mocked_queries(obj: Any) -> None: with open(gql_db_fname, encoding="utf-8", mode="w") as f: - json.dump(obj, f) + json.dump(obj, f, indent=2) + f.write("\n") key = f"query_sha={sha256(query.encode('utf-8')).hexdigest()} " + " ".join([f"{k}={kwargs[k]}" for k in sorted(kwargs.keys())]) mocked_queries = get_mocked_queries() @@ -34,6 +36,14 @@ def save_mocked_queries(obj: Any) -> None: class TestGitHubPR(TestCase): + @mock.patch('trymerge.gh_graphql', side_effect=mocked_gh_graphql) + def test_match_rules(self, mocked_gql: Any) -> None: + """ Tests that PR passes merge rules + """ + pr = GitHubPR("pytorch", "pytorch", 71759) + repo = GitRepo(get_git_repo_dir(), get_git_remote_name()) + self.assertTrue(find_matching_merge_rule(pr, repo) is not None) + @mock.patch('trymerge.gh_graphql', side_effect=mocked_gh_graphql) def test_get_author_null(self, mocked_gql: Any) -> None: """ Tests that PR author can be computed