Skip to content

Commit

Permalink
#0: set data movement kernels to build at O2
Browse files Browse the repository at this point in the history
  • Loading branch information
nhuang-tt committed Feb 25, 2025
1 parent 663244a commit d15ef7e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ void configure_kernel_variant(
.processor = tt::tt_metal::DataMovementProcessor::RISCV_1,
.noc = my_noc_index,
.compile_args = compile_args,
.defines = defines});
.defines = defines,
.opt_level = KernelBuildOptLevel::Os});
}

// Specific to this test. This test doesn't use Buffers, and for Storage cores in L1 that have 2 banks, they are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <functional>
#include <random>

#include "kernel_types.hpp"
#include "logger.hpp"
#include <tt-metalium/host_api.hpp>
#include <tt-metalium/tt_align.hpp>
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/api/tt-metalium/kernel_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct DataMovementConfig {
// This file is then automatically included in the generated compiled kernel files
std::map<std::string, std::string> defines;
// Set the compiler and linker optimization level
KernelBuildOptLevel opt_level = KernelBuildOptLevel::Os;
KernelBuildOptLevel opt_level = KernelBuildOptLevel::O2;
};

struct ReaderDataMovementConfig : public DataMovementConfig {
Expand Down
7 changes: 5 additions & 2 deletions tt_metal/impl/dispatch/kernel_config/fd_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <tt_metal.hpp>
#include "dprint_server.hpp"

#include "kernel_types.hpp"
#include "prefetch.hpp"
#include "dispatch.hpp"
#include "dispatch_s.hpp"
Expand Down Expand Up @@ -134,7 +135,8 @@ void FDKernel::configure_kernel_variant(
: tt::tt_metal::DataMovementProcessor::RISCV_1,
.noc = noc_selection_.non_dispatch_noc,
.compile_args = compile_args,
.defines = defines});
.defines = defines,
.opt_level = KernelBuildOptLevel::Os});
} else {
tt::tt_metal::CreateKernel(
*program_,
Expand All @@ -144,6 +146,7 @@ void FDKernel::configure_kernel_variant(
.eth_mode = is_active_eth_core ? Eth::SENDER : Eth::IDLE,
.noc = noc_selection_.non_dispatch_noc,
.compile_args = compile_args,
.defines = defines});
.defines = defines,
.opt_level = KernelBuildOptLevel::Os});
}
}

0 comments on commit d15ef7e

Please sign in to comment.