Skip to content
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

Prune static cuda libraries DALI links with from unused archs #4317

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Oct 6, 2022

  • prune static cuda libraries DALI links with from unused
    architectures so there is no device code linked with DALI
    other than 35, 50, 60, 70, 80 and 90. In result the DALI wheel
    is a bit smaller
  • this PR affects only dockerized builds

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

  • prune static cuda libraries DALI links with from unused
    architectures so there is no device code linked with DALI
    other than 35, 50, 60, 70, 80 and 90. In result the DALI wheel
    is a bit smaller
  • this PR affects only dockerized builds

Additional information:

Affected modules and functionalities:

  • docker/Dockerfile.cuda102.x86_64.deps
  • docker/Dockerfile.cuda118.aarch64.deps
  • docker/Dockerfile.cuda118.x86_64.deps

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@JanuszL JanuszL marked this pull request as draft October 6, 2022 18:20
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 6, 2022

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6111732]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6111732]: BUILD PASSED

@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 7, 2022

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6116431]: BUILD STARTED

@@ -28,6 +28,12 @@ RUN pip install future setuptools wheel clang flake8 && \

RUN ldconfig

RUN nvprune -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 \
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do the same with libcufft_static.a?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry but not really. It is more complicated.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6116431]: BUILD PASSED

@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 7, 2022

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6117312]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6117312]: BUILD FAILED

@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 7, 2022

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6117712]: BUILD STARTED

@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 7, 2022

Only 5 MB, but still something.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6117712]: BUILD PASSED

@JanuszL JanuszL changed the title Shrink binary a bit Prune static cuda libraries DALI links with from unused archs Oct 7, 2022
@JanuszL JanuszL force-pushed the strip_archs branch 2 times, most recently from 69fdfc0 to b4fa35e Compare October 7, 2022 15:33
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6119846]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6119849]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6119849]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6119846]: BUILD FAILED

- prune static cuda libraries DALI links with from unused
  architectures so there is no device code linked with DALI
  other than 35, 50, 60, 70, 80 and 90. In result the DALI wheel
  is a bit smaller
- this PR affects only dockerized builds

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6120802]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6120806]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6120806]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6120802]: BUILD FAILED

@JanuszL JanuszL marked this pull request as ready for review October 10, 2022 07:36
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6120802]: BUILD PASSED

@JanuszL JanuszL merged commit a507066 into NVIDIA:main Oct 10, 2022
@JanuszL JanuszL deleted the strip_archs branch October 10, 2022 10:18
JanuszL added a commit to JanuszL/DALI that referenced this pull request Oct 12, 2022
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.

None yet

4 participants