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

Boost fetching from CPM is janky #17441

Closed
blozano-tt opened this issue Jan 31, 2025 · 0 comments
Closed

Boost fetching from CPM is janky #17441

blozano-tt opened this issue Jan 31, 2025 · 0 comments

Comments

@blozano-tt
Copy link
Contributor

blozano-tt commented Jan 31, 2025

Today, we use a custom cmake module: fetch_boost.cmake which aims to install boost components for consumption within our project.

This script was copied into tt-train, and tt-umd.

This script causes difficulty in packaging, and in pulling boost from the system.

At the time of this writing, the CPM github page provides an example of the correct way to integrate boost components.
https://github.com/cpm-cmake/CPM.cmake/blob/cd28d445aeb4cecd9d10d63a55a52bcbdd8bf17e/examples/boost/CMakeLists.txt#L14-L21

I don't understand why we wrote our custom module.

CPM github page recommends using Boost 1.86 to avoid bugs in Boost CMake files.

The challenge here is that we need to update two repos, both tt-metal and tt-umd and avoid breaking any consumers.

There are currently two PRs in flight to solve this issue:

#17336
tenstorrent/tt-umd#495

Steps for a smooth transition:

  1. TT-M pulls in boost::interprocess
  • There is no behaviour change here; we're just fetching this piece of boost earlier in the CMake configure phase
  1. TT-UMD switches to clean CPM, but guarded by if(NOT TARGET boost_interprocess
  • When TT-UMD builds on its own, it will be using the new mechanism
  • When TT-UMD builds as a subproject, it'll use the target brought in by the master project
  1. Switch TT-M to the new behaviour
  2. (optional) TT-UMD can probably drop the conditional at this point

One sideeffect of the new mechanism is that master projects may need to list the superset of all components that the entire build will require. I'm not certain whether CPM will augment previously imported targets to add additionally listed components. I suspect not.

afuller-TT added a commit that referenced this issue Jan 31, 2025
### Ticket
#17441

### Problem description
Current method of fetching Boost is problematic for packaging and using
system Boost.

### What's changed
Step 1 in the migration dance across TT-Metalium && TT-UMD:
* Satisfy TT-UMD's need for Boost::Interprocess

See the ticket for the rest of the song'n'dance.
afuller-TT added a commit to tenstorrent/tt-umd that referenced this issue Jan 31, 2025
### Issue
tenstorrent/tt-metal#17441

### Description
Switch to pulling in Boost in a way that we can package and/or pull it
from the system instead

### List of the changes
* Delete fetch_boost
* Pull in Boost as advised by CPM
* Guard against incompatible inclusion styles to smooth the transition
across TT-Metalium and TT-UMD. More details in the ticket.

### Testing
It compiles.

### API Changes
There are no API changes in this PR.
nikileshx pushed a commit to nikileshx/tt-metal that referenced this issue Feb 3, 2025
### Ticket
tenstorrent#17441

### Problem description
Current method of fetching Boost is problematic for packaging and using
system Boost.

### What's changed
Step 1 in the migration dance across TT-Metalium && TT-UMD:
* Satisfy TT-UMD's need for Boost::Interprocess

See the ticket for the rest of the song'n'dance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant