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

Unvendor nlohmann json #15956

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Unvendor nlohmann json #15956

merged 1 commit into from
Dec 13, 2024

Conversation

blozano-tt
Copy link
Contributor

@blozano-tt blozano-tt commented Dec 12, 2024

Ticket

Closes #14326

Problem description

json is an external dependency, lets treat it like one.
By having it as an external dependency, we can easily:

  • increment version
  • Use library target in cmake
  • Avoid bundling it in our wheel
  • Avoid conflicts where multiple system components must align to the same json version
  • Get it from the system if desired by customer

What's changed

Use json like external dep.
Bring it in from CPM.
Use cmake library target to propagate include path.

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • (For models and ops writers) Full new models tests passes
  • New/Existing tests provide coverage for changes

@@ -4,7 +4,7 @@

#pragma once

#include "tt_metal/third_party/json/json.hpp"
#include <nlohmann/json.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@patrickroberts @yan-zaretskiy
So this is our preferred way of referring to external libraries that we pull in through any dependency management system (in this case, CPM)? So it's clear it's external?

Copy link
Member

Choose a reason for hiding this comment

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

external lib ideally you include via <>.
things from your project you include via ""

@@ -18,7 +18,7 @@
#include "impl/event/event.hpp"
#include "impl/program/program.hpp"
#include "tests/tt_metal/tt_metal/common/dispatch_fixture.hpp"
#include "third_party/json/json.hpp"
#include <nlohmann/json.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait this wasn't even a submodule? We just copy-pasted the files??

Copy link
Collaborator

Choose a reason for hiding this comment

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

lol

Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂️

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's what vendoring is hahaahahahahahaah
We are a funny "SW" engineering company

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 learned this term from Rayray

@blozano-tt blozano-tt merged commit 8d1206f into main Dec 13, 2024
120 checks passed
@blozano-tt blozano-tt deleted the blozano-json branch December 13, 2024 02:27
@tt-rkim
Copy link
Collaborator

tt-rkim commented Dec 13, 2024

POGGERS TY BOSS MAN

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.

Unvendor json, and bring it from CPM
7 participants