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

SGR/Assistant: making sure linker drops unnecessary dependencies #112871

Closed
wants to merge 1 commit into from

Conversation

ZainRizvi
Copy link
Contributor

Summary:
Assistant/SGR is linked in a way that links to all not-reference libraries are dropped: https://www.internalfb.com/code/fbsource/[c74911ac21d6b90d1fbca8f2de08d6269f44e1fc]/xplat/toolchains/android/ndk/ndk_toolchains.bzl?lines=931
However, caffe2 overrides this setting https://www.internalfb.com/code/fbsource/[2536ee6849b08da1adcd5b9da0e455a4af3a06d1][blame]/xplat/caffe2/c2_defs.bzl?lines=496. That results in the build breaks like discussed here: https://fb.workplace.com/groups/llvm.gcc/permalink/25390586597229949/ : Assistant doesn't use libforce_dlopen but it sill requires it, and that library exist on device.

As we statically link all operators, the caffe2 override doesn't seem to be necessary.

This diff adds a build parameter affecting caffe2 linker options.

Test Plan:
Built supernova experimental build, made sure Assistant starts without operator issues.
Tried tts, ocr and asr command in SGR, made sure they work.

Verified that hypernova build doesn't required libforce_dlopen when D50695343 is applied.

Reviewed By: veselinp

Differential Revision: D50870489

Summary:
Assistant/SGR is linked in a way that links to all not-reference libraries are dropped: https://www.internalfb.com/code/fbsource/[c74911ac21d6b90d1fbca8f2de08d6269f44e1fc]/xplat/toolchains/android/ndk/ndk_toolchains.bzl?lines=931
However, `caffe2` overrides this setting https://www.internalfb.com/code/fbsource/[2536ee6849b08da1adcd5b9da0e455a4af3a06d1][blame]/xplat/caffe2/c2_defs.bzl?lines=496. That results in the build breaks like discussed here: https://fb.workplace.com/groups/llvm.gcc/permalink/25390586597229949/ : Assistant doesn't use libforce_dlopen but it sill requires it, and that library exist on device.

As we statically link all operators, the `caffe2` override doesn't seem to be necessary.

This diff adds a build parameter affecting `caffe2` linker options.

Test Plan:
Built supernova experimental build, made sure Assistant starts without operator issues.
Tried tts, ocr and asr command in SGR, made sure they work.

Verified that hypernova build doesn't required libforce_dlopen when D50695343 is applied.

Reviewed By: veselinp

Differential Revision: D50870489
Copy link

pytorch-bot bot commented Nov 3, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit bdfe13e with merge base 44a28a5 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

Copy link

linux-foundation-easycla bot commented Nov 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50870489

@ZainRizvi ZainRizvi added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Nov 3, 2023
@vybv
Copy link
Contributor

vybv commented Nov 3, 2023

@pytorchbot label "topic: not user facing

Copy link

pytorch-bot bot commented Nov 3, 2023

❌ 🤖 pytorchbot command failed:

Got EOF while in a quoted string```
Try `@pytorchbot --help` for more info.

@vybv
Copy link
Contributor

vybv commented Nov 3, 2023

@pytorchbot label "topic: not user facing"

@ZainRizvi
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Approval needed from one of the following:
Nayef211, Aymendje, jarodhou, dulinriley, vmoens, ...

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@ZainRizvi
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@ZainRizvi ZainRizvi closed this Nov 8, 2023
@huydhn huydhn reopened this Nov 15, 2023
@huydhn
Copy link
Contributor

huydhn commented Nov 15, 2023

Reopen this to merge the change as this is not yet merged

@huydhn
Copy link
Contributor

huydhn commented Nov 15, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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
ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants