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

Make uv and nng private and static #323

Merged
merged 6 commits into from
Nov 23, 2024
Merged

Conversation

blozano-tt
Copy link
Collaborator

@blozano-tt blozano-tt commented Nov 22, 2024

Issue

NA

Description

libnng.so is no longer a public dependency as of this PR: #224
Additionally, given that it is only consumed here it would be advantageous to statically link it.
Why?
So we don't have to:

  • Install it
  • Package it in a debian
  • Bundle it in a ttnn python wheel ... etc ...

Along the above lines, I don't want to run into issues like this:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line [11](https://github.com/tenstorrent/tt-metal/actions/runs/11964313949/job/33356936955#step:6:12)1, in _get_module_details
    __import__(pkg_name)
  File "/home/ubuntu/actions-runner/_work/tt-metal/tt-metal/tests/end_to_end_tests/env/lib/python3.8/site-packages/ttnn/__init__.py", line 20, in <module>
    import ttnn._ttnn
ImportError: libnng.so.1: cannot open shared object file: No such file or directory

List of the changes

Build nng as static
Make it private linkage

Testing

Hoping CI is good enough

API Changes

There are no API changes in this PR.

@blozano-tt blozano-tt changed the title Make nng private and static Make uv and nng private and static Nov 22, 2024
Copy link
Contributor

@broskoTT broskoTT left a comment

Choose a reason for hiding this comment

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

LGTM, especially since all the checks are green. Not sure if I'm missing some impact of this change

@blozano-tt
Copy link
Collaborator Author

LGTM, especially since all the checks are green. Not sure if I'm missing some impact of this change

I am doing a quick test integration on metal side

@blozano-tt
Copy link
Collaborator Author

LGTM, especially since all the checks are green. Not sure if I'm missing some impact of this change

I am doing a quick test integration on metal side

https://github.com/tenstorrent/tt-metal/actions/runs/11978804872

Things are looking good ... just one flaky test failure...

@blozano-tt blozano-tt enabled auto-merge (squash) November 23, 2024 00:59
@blozano-tt blozano-tt merged commit 0a41bf5 into main Nov 23, 2024
9 of 12 checks passed
@blozano-tt blozano-tt deleted the blozano-make-nng-private-static branch November 23, 2024 01:01
broskoTT added a commit that referenced this pull request Nov 26, 2024
broskoTT added a commit that referenced this pull request Nov 26, 2024
This reverts commit 0a41bf5.

### Issue
No issue

### Description
This change broke tt-metal build.
post commit workflow failing:
https://github.com/tenstorrent/tt-metal/actions/runs/12031721201
post commit workflow on this branch:
https://github.com/tenstorrent/tt-metal/actions/runs/12032379476/job/33545486354
blackhole post-commit failing:
https://github.com/tenstorrent/tt-metal/actions/runs/12031811999
blackhole post-commit on this branch:
https://github.com/tenstorrent/tt-metal/actions/runs/12032509241

### List of the changes
- git revert 0a41bf5

### Testing
see description

### API Changes
-
broskoTT pushed a commit that referenced this pull request Nov 27, 2024
broskoTT added a commit that referenced this pull request Dec 2, 2024
### Issue
Original PR was #323, then the reverted one was #336

### Description
libnng.so is no longer a public dependency as of this PR:
#224
Additionally, given that it is only consumed here it would be
advantageous to statically link it.
Why?
So we don't have to:
- Install it
- Package it in a debian
- Bundle it in a ttnn python wheel ... etc ... 

Along the above lines, I don't want to run into issues like this:
```
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line [11](https://github.com/tenstorrent/tt-metal/actions/runs/11964313949/job/33356936955#step:6:12)1, in _get_module_details
    __import__(pkg_name)
  File "/home/ubuntu/actions-runner/_work/tt-metal/tt-metal/tests/end_to_end_tests/env/lib/python3.8/site-packages/ttnn/__init__.py", line 20, in <module>
    import ttnn._ttnn
ImportError: libnng.so.1: cannot open shared object file: No such file or directory
```
### List of the changes
Build nng as static
Make it private linkage

### Testing
Hoping CI is good enough

### API Changes
There are no API changes in this PR.

---------

Co-authored-by: Bryan Wilder Field Lozano <[email protected]>
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.

5 participants