Skip to content

Added pytorch patch file to revert https://github.com/pytorch/pytorch…#4137

Merged
vanbasten23 merged 2 commits intor1.13from
addPatch
Oct 28, 2022
Merged

Added pytorch patch file to revert https://github.com/pytorch/pytorch…#4137
vanbasten23 merged 2 commits intor1.13from
addPatch

Conversation

@vanbasten23
Copy link
Copy Markdown
Collaborator

@vanbasten23 vanbasten23 commented Oct 27, 2022

Added pytorch patch file to revert pytorch/pytorch#81058

The patch file is obtained by

(pytorch) root@t1v-n-2a2b95ef-w-0:/pytorch# git log --after="2022-07-12 00:00" --before="2022-07-12 23:59"
...
commit b256ff6a8f90441931006958fac223835526f1c3
Author: Sahan Paliskara <sahanp@fb.com>
Date:   Tue Jul 12 18:10:22 2022 +0000

    Allow torch._C to be recognized a module in torch.package (#80917)

commit d552ba3b4f53da9b6a5f6e0463111e43b367ef8a
Author: atalman <atalman@fb.com>
Date:   Tue Jul 12 17:56:33 2022 +0000

     Use fabi-version=11 to ensure compatibility between gcc7 and gcc9 binaries (#81058)

    Fixes: #80489

commit d5bda292074d20cb1164020c4bf3b83a3156bd22
Author: Nikita Shulga <nshulga@fb.com>
Date:   Tue Jul 12 17:35:30 2022 +0000

    [JIT] Tweak annotation extraction for py3.10 (#81334)

    The way Python-3.10+ deals with annotations has changed, see
    https://docs.python.org/3/howto/annotations.html#accessing-the-annotations-dict-of-an-object-in-python-3-10-
and-newer
...

(pytorch) root@t1v-n-2a2b95ef-w-0:/pytorch# git diff d552ba3b4f53da9b6a5f6e0463111e43b367ef8a..d5bda292074d20cb1164020c4bf3b83a3156bd22 -- CMakeLists.txt > revert.patch

@JackCaoG
Copy link
Copy Markdown
Collaborator

build is not happy, most likely code has changed, can you look at most recently 1.13 code and figure out the new diff?

@JackCaoG
Copy link
Copy Markdown
Collaborator

JackCaoG commented Oct 28, 2022

code is in https://github.com/pytorch/pytorch/blob/master/CMakeLists.txt#L50

  1. check out pytorch 1.13 branch
  2. manually delete this two lines
  3. do a git diff

then you should be good.

@vanbasten23
Copy link
Copy Markdown
Collaborator Author

code is in https://github.com/pytorch/pytorch/blob/master/CMakeLists.txt#L50

  1. check out pytorch 1.13 branch
  2. manually delete this two lines
  3. do a git diff

then you should be good.

SG.

(base) jenkins@efd99baac2e8:/workspace/pytorch$ git status
On branch release/1.13
Your branch is up to date with 'origin/release/1.13'.

nothing to commit, working tree clean
(base) jenkins@efd99baac2e8:/workspace/pytorch$ vim CMakeLists.txt
(base) jenkins@efd99baac2e8:/workspace/pytorch$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2c6fb2496..5cbd50a159 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,10 +44,6 @@ if(DEFINED GLIBCXX_USE_CXX11_ABI)
   if(${GLIBCXX_USE_CXX11_ABI} EQUAL 1)
     set(CXX_STANDARD_REQUIRED ON)
     string(APPEND CMAKE_CXX_FLAGS " -D_GLIBCXX_USE_CXX11_ABI=1")
-  else()
-    # Please note this is required in order to ensure compatibility between gcc 9 and gcc 7
-    # This could be removed when all Linux PyTorch binary builds are compiled by the same toolchain again
-    string(APPEND CMAKE_CXX_FLAGS " -fabi-version=11")
   endif()
 endif()

Re-copy and paste the diff into the current file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants