Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore:Dockerfile-cuda - Retain major CC when pruning static cuBLAS lib#635

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
polarathene wants to merge1 commit intohuggingface:main
base:main
Choose a base branch
Loading
frompolarathene:patch-1

Conversation

polarathene
Copy link

What does this PR do?

Pruning cuBLAS for CC 7.5 now also retainssm_70 in addition to thesm_75 target. See#610 (comment) for more information.

@polarathene
Copy link
Author

polarathene commentedJun 13, 2025
edited
Loading

NOTE: There is no known need to do this for TEI, howeverNvidia encourages retaining the major CC and any minors in-between when usingnvprune on cuBLAS.


Feel free to close the PR if you prefer to avoid until there's a relevant bug report. My understanding is it should only be an issue when using a kernel from cuBLAS that would defer tosm_70 when it'd have been equivalent forsm_75.

For example in the current base image used to build,sm_70 has 184 cubins vssm_75 containing only 8:

$cuobjdump --list-elf /usr/local/cuda/lib64/libcublas_static.a| grep -oE'\.sm_70.*\.'| wc -l184$cuobjdump --list-elf /usr/local/cuda/lib64/libcublas_static.a| grep -oE'\.sm_75.*\.'| wc -l8#Individual cubins:$cuobjdump --list-elf /usr/local/cuda/lib64/libcublas_static.a| grep -E'\.sm_75.*\.'ELF file    5: libcublas_static.5.sm_75.cubinELF file   13: libcublas_static.13.sm_75.cubinELF file   21: libcublas_static.21.sm_75.cubinELF file   29: libcublas_static.29.sm_75.cubinELF file   37: libcublas_static.37.sm_75.cubinELF file   45: libcublas_static.45.sm_75.cubinELF file   53: libcublas_static.53.sm_75.cubinELF file   61: libcublas_static.61.sm_75.cubin

I'm not entirely sure why the minor CC versions in-between (when present) might matter to be retained.


The concern does not apply to the other two supported real archs handled vianvprune assm_80 is already provided, whilesm_90 does not target anything newer (since it's theonly arch for that CC major):

nvprune --generate-code code=sm_80 --generate-code code=sm_${CUDA_COMPUTE_CAP} /usr/local/cuda/lib64/libcublas_static.a -o /usr/local/cuda/lib64/libcublas_static.a; \
elif [ ${CUDA_COMPUTE_CAP} -eq 90 ]; \
then \
nvprune --generate-code code=sm_90 /usr/local/cuda/lib64/libcublas_static.a -o /usr/local/cuda/lib64/libcublas_static.a; \

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@polarathene

[8]ページ先頭

©2009-2025 Movatter.jp