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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ CPMAddPackage(NAME range-v3 GITHUB_REPOSITORY ericniebler/range-v3 GIT_TAG 0.12.
############################################################################################################################

CPMAddPackage(NAME pybind11 GITHUB_REPOSITORY pybind/pybind11 GIT_TAG b8f28551cc3a98ea9fbfc15c05b513c8f2d23e84)

############################################################################################################################
# nlohmann/json : https://github.com/nlohmann/json
############################################################################################################################

CPMAddPackage(NAME json GITHUB_REPOSITORY nlohmann/json GIT_TAG v3.9.1)
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target_link_libraries(
INTERFACE
pthread
gmock_main
nlohmann_json::nlohmann_json
magic_enum
fmt::fmt-header-only
span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

#include "tt_metal/common/core_coord.hpp"

static inline std::string to_string(pkt_dest_size_choices_t choice) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

❤️

#include "tt_metal/common/logger.hpp"
#include "ttnn/device.hpp"
#include "ttnn/graph/graph_operation_queries.hpp"
Expand Down
1 change: 1 addition & 0 deletions tt_metal/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target_link_libraries(common PRIVATE yaml-cpp::yaml-cpp)
target_link_libraries(
common
PUBLIC
nlohmann_json::nlohmann_json
magic_enum
fmt::fmt-header-only
span
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/common/core_coord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <string>
#include <vector>

#include "third_party/json/json.hpp"
#include <nlohmann/json.hpp>
#include "umd/device/tt_xy_pair.h"
#include "tt_metal/tt_stl/reflection.hpp"
#include "tt_metal/tt_stl/span.hpp"
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/impl/buffers/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "umd/device/types/xy_pair.h"
#include "tt_metal/tt_stl/concepts.hpp"
#include "tt_metal/common/assert.hpp"
#include "third_party/json/json.hpp"
#include <nlohmann/json.hpp>

#include "llrt/hal.hpp"

Expand Down
Loading
Loading