Skip to content

Reland of "D27708346: generate xla codegen in-tree"#56601

Closed
bdhirsh wants to merge 3 commits intogh/bdhirsh/107/basefrom
gh/bdhirsh/107/head
Closed

Reland of "D27708346: generate xla codegen in-tree"#56601
bdhirsh wants to merge 3 commits intogh/bdhirsh/107/basefrom
gh/bdhirsh/107/head

Conversation

@bdhirsh
Copy link
Copy Markdown
Collaborator

@bdhirsh bdhirsh commented Apr 21, 2021

This is a re-land of #55050, but with a small change (pasted the patch below).

I confirmed that RegistrationDeclarations.yaml doesn't change after this PR with the following:

diff -Naur build/aten/src/ATen/RegistrationDeclarations.h ../pytorch/build/aten/src/ATen/RegistrationDeclarations.h

patch:

--- a/tools/codegen/api/types.py
+++ b/tools/codegen/api/types.py
@@ -41,12 +41,12 @@ tensorListT = BaseCppType('at', 'TensorList')
 dimnameT = BaseCppType('at', 'Dimname')
 dimnameListT = BaseCppType('at', 'DimnameList')
 layoutT = BaseCppType('at', 'Layout')
-deviceT = BaseCppType('c10', 'Device')
+deviceT = BaseCppType('at', 'Device')
 scalarT = BaseCppType('at', 'Scalar')
 memoryFormatT = BaseCppType('at', 'MemoryFormat')
 qschemeT = BaseCppType('at', 'QScheme')
 storageT = BaseCppType('at', 'Storage')
-streamT = BaseCppType('', 'Stream')
+streamT = BaseCppType('at', 'Stream')
 intArrayRefT = BaseCppType('at', 'IntArrayRef')
 tensorOptionsT = BaseCppType('at', 'TensorOptions')
 typeAndSizeT = BaseCppType('torch::autograd::generated', 'TypeAndSize')

I must have accidentally added the c10 when I was debugging, to reduce the number of byte-for-byte changes in aten_xla_type_default.cpp. That caused a change to RegistrationDeclarations.yaml, which is BC-breaking for any downstream consumers.

Stack from ghstack:

Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

Differential Revision: D27915305

Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Apr 21, 2021

💊 CI failures summary and remediations

As of commit 61542aa (more details on the Dr. CI page):


  • 2/2 failures possibly* introduced in this PR
    • 1/2 non-scanned failure(s)

1 failure not recognized by patterns:

Job Step Action
CircleCI pytorch_windows_vs2019_py36_cuda10.1_test2 Test 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

bdhirsh added a commit that referenced this pull request Apr 21, 2021
Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

ghstack-source-id: 45ceaba
Pull Request resolved: #56601
@bdhirsh bdhirsh requested a review from ailzhang April 21, 2021 18:21
Copy link
Copy Markdown
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Thanks!

This is a re-land of #55050, but with a small change (pasted the patch below).

I confirmed that RegistrationDeclarations.yaml doesn't change after this PR with the following:
```
diff -Naur build/aten/src/ATen/RegistrationDeclarations.h ../pytorch/build/aten/src/ATen/RegistrationDeclarations.h
```

patch:
```
--- a/tools/codegen/api/types.py
+++ b/tools/codegen/api/types.py
@@ -41,12 +41,12 @@ tensorListT = BaseCppType('at', 'TensorList')
 dimnameT = BaseCppType('at', 'Dimname')
 dimnameListT = BaseCppType('at', 'DimnameList')
 layoutT = BaseCppType('at', 'Layout')
-deviceT = BaseCppType('c10', 'Device')
+deviceT = BaseCppType('at', 'Device')
 scalarT = BaseCppType('at', 'Scalar')
 memoryFormatT = BaseCppType('at', 'MemoryFormat')
 qschemeT = BaseCppType('at', 'QScheme')
 storageT = BaseCppType('at', 'Storage')
-streamT = BaseCppType('', 'Stream')
+streamT = BaseCppType('at', 'Stream')
 intArrayRefT = BaseCppType('at', 'IntArrayRef')
 tensorOptionsT = BaseCppType('at', 'TensorOptions')
 typeAndSizeT = BaseCppType('torch::autograd::generated', 'TypeAndSize')
```

I must have accidentally added the `c10` when I was debugging, to reduce the number of byte-for-byte changes in `aten_xla_type_default.cpp`. That caused a change to `RegistrationDeclarations.yaml`, which is BC-breaking for any downstream consumers.



Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

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

[ghstack-poisoned]
This is a re-land of #55050, but with a small change (pasted the patch below).

I confirmed that RegistrationDeclarations.yaml doesn't change after this PR with the following:
```
diff -Naur build/aten/src/ATen/RegistrationDeclarations.h ../pytorch/build/aten/src/ATen/RegistrationDeclarations.h
```

patch:
```
--- a/tools/codegen/api/types.py
+++ b/tools/codegen/api/types.py
@@ -41,12 +41,12 @@ tensorListT = BaseCppType('at', 'TensorList')
 dimnameT = BaseCppType('at', 'Dimname')
 dimnameListT = BaseCppType('at', 'DimnameList')
 layoutT = BaseCppType('at', 'Layout')
-deviceT = BaseCppType('c10', 'Device')
+deviceT = BaseCppType('at', 'Device')
 scalarT = BaseCppType('at', 'Scalar')
 memoryFormatT = BaseCppType('at', 'MemoryFormat')
 qschemeT = BaseCppType('at', 'QScheme')
 storageT = BaseCppType('at', 'Storage')
-streamT = BaseCppType('', 'Stream')
+streamT = BaseCppType('at', 'Stream')
 intArrayRefT = BaseCppType('at', 'IntArrayRef')
 tensorOptionsT = BaseCppType('at', 'TensorOptions')
 typeAndSizeT = BaseCppType('torch::autograd::generated', 'TypeAndSize')
```

I must have accidentally added the `c10` when I was debugging, to reduce the number of byte-for-byte changes in `aten_xla_type_default.cpp`. That caused a change to `RegistrationDeclarations.yaml`, which is BC-breaking for any downstream consumers.



Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

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

[ghstack-poisoned]
bdhirsh added a commit that referenced this pull request Apr 21, 2021
Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

ghstack-source-id: 6374be7
Pull Request resolved: #56601
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@bdhirsh merged this pull request in 76fbd75.

@facebook-github-bot facebook-github-bot deleted the gh/bdhirsh/107/head branch April 25, 2021 14:16
krshrimali pushed a commit to krshrimali/pytorch that referenced this pull request May 19, 2021
Summary:
Pull Request resolved: pytorch#56601

Updating it to ensure that RegistrationDeclarations.yaml is completely
unchanged

This reverts commit 90e532f.

Test Plan: Imported from OSS

Reviewed By: ailzhang

Differential Revision: D27915305

Pulled By: bdhirsh

fbshipit-source-id: 491a025c44221690dad849f9a2166934130c0fec
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