Skip to content

Commit

Permalink
Privatize Taskflow (#16838)
Browse files Browse the repository at this point in the history
  • Loading branch information
blozano-tt authored Jan 17, 2025
1 parent a8396fa commit d9502be
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <numeric>
#include <algorithm>
#include <random>
#include <queue>

using std::vector;
using namespace tt;
Expand Down
4 changes: 4 additions & 0 deletions tt-train/sources/ttml/autograd/module_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include "module_base.hpp"

#include <queue>
#include <string>
#include <unordered_set>

namespace ttml::autograd {

void ModuleBase::register_tensor(const TensorPtr& tensor_ptr, const std::string& name) {
Expand Down
1 change: 0 additions & 1 deletion tt_metal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ target_link_libraries(
nlohmann_json::nlohmann_json
TT::Metalium::HostDevCommon
Reflect::Reflect
Taskflow::Taskflow
PRIVATE
Metalium::Metal::Impl
Metalium::Metal::STL
Expand Down
5 changes: 1 addition & 4 deletions tt_metal/api/tt-metalium/build.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <future>

#include "tt_backend_api_types.hpp"
#include "executor.hpp"
#include "utils.hpp"
#include "core_coord.hpp"
#include "data_format.hpp"
Expand Down Expand Up @@ -178,9 +177,7 @@ void jit_build(const JitBuildState& build, const JitBuildSettings* settings);
void jit_build_set(const JitBuildStateSet& builds, const JitBuildSettings* settings);
void jit_build_subset(const JitBuildStateSubset& builds, const JitBuildSettings* settings);

inline void launch_build_step(const std::function<void()> build_func, std::vector<std::shared_future<void>>& events) {
events.emplace_back(detail::async(build_func));
}
void launch_build_step(const std::function<void()>& build_func, std::vector<std::shared_future<void>>& events);

inline void sync_build_step(std::vector<std::shared_future<void>>& events) {
for (auto& f : events) {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion tt_metal/impl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ target_link_libraries(
PUBLIC
common
Tracy::TracyClient
Taskflow::Taskflow
PRIVATE
Boost::smart_ptr
range-v3::range-v3
Metalium::Metal::Common
Taskflow::Taskflow
TT::Metalium::HostDevCommon
Metalium::Metal::Hardware
)
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/impl/program/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <range/v3/view/transform.hpp>

#include <circular_buffer_types.hpp>
#include <executor.hpp>
#include "common/executor.hpp"
#include <profiler.hpp>
#include "tt_metal/detail/kernel_cache.hpp"
#include <persistent_kernel_cache.hpp>
Expand Down
1 change: 1 addition & 0 deletions tt_metal/jit_build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target_link_libraries(
PUBLIC
common
PRIVATE
Metalium::Metal::Common
Tracy::TracyClient
Taskflow::Taskflow
TT::Metalium::HostDevCommon
Expand Down
6 changes: 5 additions & 1 deletion tt_metal/jit_build/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <string>
#include <thread>

#include <executor.hpp>
#include "common/executor.hpp"
#include "jit_build/genfiles.hpp"
#include "jit_build/kernel_args.hpp"
#include <common.hpp>
Expand Down Expand Up @@ -732,4 +732,8 @@ void jit_build_subset(const JitBuildStateSubset& build_subset, const JitBuildSet
sync_build_step(events);
}

void launch_build_step(const std::function<void()>& build_func, std::vector<std::shared_future<void>>& events) {
events.emplace_back(detail::async(build_func));
}

} // namespace tt::tt_metal
2 changes: 2 additions & 0 deletions ttnn/tools/profiler/op_profiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#pragma once

#include <filesystem>
#include <mutex>
#include <reflect>
#include <stack>
#include <tuple>
#include <type_traits>

Expand Down

0 comments on commit d9502be

Please sign in to comment.