-
Notifications
You must be signed in to change notification settings - Fork 97
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
Issue Building Wheel with custom UMD #15527
Comments
I took @broskoTT's tt-metal branch that had the custom UMD submodule. I built the wheel locally. I unzip the whl: I run ldd, and there is no linkage of uv or nng required:
|
You sent me down quite the rabbit hole, Mr. Boss. But I think I have answers for you. So I downloaded the artifact directly from the workflow, then used
Then I took a look with
Looks like it's looking for Anyway, like you and I suspect, something might be afoul with how we use UMD in the wheel build. I took a look at
It's using nng there, but no Which brings me to my next point that you brought up:
We actually don't separate it in this case. There is a separate workflow outside of APC that does the wheel C++ build within the wheel build process, but not in APC. In APC, we take the build artifacts from Anyway, I thought I'd take a look at what's going with the build artifact. I downloaded that and set the rpath as well:
Odd, so Firstly, we still seem to package some
So it wasn't even statically built. I don't see But then that begs the question - how do the other tests work if under normal conditions I think this is because we set
This means we'll always be able to find our libs, even if the libs themselves can't find each other under normal circumstances. So my conclusion is the following:
I think I'll leave it up to you for our best way forward. I think a couple of options are:
I would personally avoid any further use of |
Here is an isolated build of the UMD branch, note that there is no dynamic linkage required for either nng or uv:
Note that we can grep for nng and uv symbols in the library as well, meaning it was successfully statically linked:
This is irrelevant if you are static linking There is something broken here, and I'm pretty sure its the infrastructure. Your investigation leads me to wonder if we are bringing in stale files from a What leads me to this suspicion is that the nng library's CMakeLists.txt uses the target name |
Didn't read the whole thing yet, but I'm leaning towards hiding We can re-visit this when the multi-host/galaxy work goes into production And go eat some turkey @blozano-tt 🦃 jeez |
I figured this out. The problem is that we use the CMake customary cache variable "BUILD_SHARED_LIBS" to determine if we should build our libraries as static or shared. tt-metal/cmake/project_options.cmake Line 10 in ab3dc0c
This variable globally impacts all of the dependencies we bring in through CPM, including those brought in by UMD's CPM. So if it is set, then nng ends up being a shared library. The quick hack to fix this for my current situation is: I am currently not sure what the right thing to do is for the project. We don't really want BUILD_SHARED_LIBS to globally impact our dependencies. Maybe we should have something like METALIUM_BUILD_SHARED_LIBS as a project option, and then set BUILD_SHARED_LIBS cc: @afuller-TT @broskoTT |
I am trying to eliminate the need for libnng and libuv to be shipped with tt-metal and distributed in the wheel.
To do so, I make the two dependencies private, and force them to be STATICALLY linked into libdevice.so
tenstorrent/tt-umd#339
When testing this custom UMD in tt-metal CI...
the build-wheel workflow is still looking for shared libraries for nng and uv !!!???
https://github.com/tenstorrent/tt-metal/actions/runs/12046563342/job/33588021255
Why?
I am also led to wonder why do we need to build python wheel separately from the C++ build???
I suspect something is afoul in the workflow.
cc: @tt-rkim @afuller-TT @broskoTT
The text was updated successfully, but these errors were encountered: