8000 [BE] Move cuda12.6 builds to gcc11 by malfet · Pull Request #148740 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[BE] Move cuda12.6 builds to gcc11 #148740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Conversation

malfet
Copy link
Contributor
@malfet malfet commented Mar 7, 2025

Stack from ghstack (oldest at bottom):

I.e. s/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc11/

Which accidentally fixes undefined symbol references errors namely

/usr/bin/ld: /var/lib/jenkins/cpp-build/caffe2/build/lib/libtorch_cuda.so: undefined reference to `std::__throw_bad_array_new_length()'

Which happens because libmagma.a that were build with gcc-11 (after #148135 ) contains symbols which are defined in /opt/rh/gcc-toolset-11/root/usr/lib/gcc/x86_64-redhat-linux/11/libstdc++_nonshared.a but missing from the corresponding library bundled with g++-9)

Though I could not figure out what flags one must use to trigger generation of those symbols, see https://godbolt.org/z/E9KfdhzzY or

$ echo "int* foo(int x) { return new int[x];}"|g++ -std=c++17 -S -O3 -x c++ -o - -
	.file	""
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	_Z3fooi
	.type	_Z3fooi, @function
_Z3fooi:
.LFB0:
	.cfi_startproc
	endbr64
	movslq	%edi, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movabsq	$2305843009213693950, %rax
	cmpq	%rax, %rdi
	ja	.L2
	salq	$2, %rdi
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	jmp	_Znam@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	_Z3fooi.cold, @function
_Z3fooi.cold:
.LFSB0:
.L2:
	.cfi_def_cfa_offset 16
	call	__cxa_throw_bad_array_new_length@PLT
	.cfi_endproc

Fixes #148728 and #148495

[ghstack-poisoned]
@malfet malfet requested review from a team and jeffdaily as code owners March 7, 2025 04:00
@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 7, 2025
Copy link
pytorch-bot bot commented Mar 7, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148740

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 69 Pending

As of commit 2d64910 with merge base d8dc700 (image):
💚 Looks good so far! There are no failures yet. 💚

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

malfet added a commit that referenced this pull request Mar 7, 2025
I.e. s/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc11/

Fixes #148728 and #148495

ghstack-source-id: a857b0e
Pull Request resolved: #148740
build-environment: linux-focal-cuda12.6-py3.10-gcc9-sm89
docker-image: ${{ needs.linux-focal-cuda12_6-py3_10-gcc9-sm89-build.outputs.docker-image }}
test-matrix: ${{ needs.linux-focal-cuda12_6-py3_10-gcc9-sm89-build.outputs.test-matrix }}
build-environment: linux-focal-cuda12.6-py3.10-gcc1-sm89
Copy link
Contributor

Choose a reason for hiding this comment

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

Gcc1 - typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Supporting gcc1 was a special request from Dr Emmet Brown who is looking forward to build PyTorch from source back in 1987

@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 7, 2025
[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 7, 2025
I.e. s/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc11/

Fixes #148728 and #148495

ghstack-source-id: 081787e
Pull Request resolved: #148740
Copy link
Contributor
@atalman atalman left a comment

Choose a reason for hiding this comment

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

lgtm

[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 7, 2025
I.e. s/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc11/

Fixes #148728 and #148495

ghstack-source-id: 36cdab3
Pull Request resolved: #148740
@Skylion007 Skylion007 added better-engineering Relatively self-contained tasks for better engineering contributors ci-verbose-test-logs Print test logs as tests happen, caution: results in interleaved and very long logs and removed ci-verbose-test-logs Print test logs as tests happen, caution: results in interleaved and very long logs labels Mar 7, 2025
@malfet malfet added the no-runner-experiments Bypass Meta/LF runner determinator label Mar 7, 2025
[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 7, 2025
I.e. s/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9/pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc11/

Fixes #148728 and #148495

ghstack-source-id: 48a9940
Pull Request resolved: #148740
@malfet
Copy link
Contributor Author
malfet commented Mar 7, 2025

@pytorchbot merge -f "Let's test in prod! Spartaaa!"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better-engineering Relatively self-contained tasks for better engineering contributors ciflow/trunk Trigger trunk jobs on your pull request Merged no-runner-experiments Bypass Meta/LF runner determinator topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0