Skip to content

Commit

Permalink
#4079: Remove dprints from op kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-aho committed Dec 6, 2023
1 parent 5e82e3c commit 1ed70ec
Show file tree
Hide file tree
Showing 48 changed files with 82 additions and 96 deletions.
2 changes: 0 additions & 2 deletions tt_eager/tt_dnn/kernels/compute/reduce_h.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include <cstdint>

#include "debug/dprint.h"

#include "compute_kernel_api/reduce.h"

namespace NAMESPACE {
Expand Down
2 changes: 0 additions & 2 deletions tt_eager/tt_dnn/kernels/compute/reduce_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include <cstdint>

#include "debug/dprint.h"

#include "compute_kernel_api/reduce.h"

namespace NAMESPACE {
Expand Down
2 changes: 0 additions & 2 deletions tt_eager/tt_dnn/kernels/compute/reduce_w.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include <cstdint>

#include "debug/dprint.h"

#include "compute_kernel_api/reduce.h"

namespace NAMESPACE {
Expand Down
2 changes: 1 addition & 1 deletion tt_eager/tt_dnn/kernels/dataflow/reader_binary_dtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"

inline void noc_async_read_from_dram_to_l1(uint32_t dram_addr, uint32_t dram_noc_x, uint32_t dram_noc_y, uint32_t l1_dest_addr, uint32_t read_size) {
uint64_t src_noc_addr = get_noc_addr(dram_noc_x, dram_noc_y, dram_addr);
noc_async_read(src_noc_addr, l1_dest_addr, read_size);
Expand Down
2 changes: 1 addition & 1 deletion tt_eager/tt_dnn/kernels/dataflow/reader_bmm_8bank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

void kernel_main() {
// same arg indices as in reader_binary_diff_lenghts for compat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <stdint.h>
#include "dataflow_api.h"

#include "debug/dprint.h"

void kernel_main() {
// same arg indices as in reader_binary_diff_lenghts for compat
uint32_t src0_addr = get_arg_val<uint32_t>(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


template <bool bias_in_dram>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

//#define DEBUG
#ifdef DEBUG
#include "debug/dprint.h"
// #include "debug/dprint.h"
#endif

void kernel_main() {
Expand Down
2 changes: 1 addition & 1 deletion tt_eager/tt_dnn/kernels/dataflow/reshape_interleaved.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

using uint32_t = std::uint32_t;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

void kernel_main() {
// This writer is for output tensor in tile format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

template <bool DRAM>
inline void write_tiles_in_block(uint32_t cb_id_out0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

FORCE_INLINE
void read_channels(uint32_t& l1_write_addr_act, const uint32_t act_l1_read_addr, const uint32_t reader_channel_idx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

void kernel_main() {
uint32_t i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

inline void pad_l1_buffer_with_zeroes(uint32_t l1_addr, uint32_t pad_size_bytes) {
volatile std::uint32_t* dst = reinterpret_cast<volatile std::uint32_t*>(l1_addr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

FORCE_INLINE void read_weight_blocks_inner_h_dim(uint32_t cb_id_weight,
uint32_t num_blocks_weight_h,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"


void kernel_main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

#ifdef FUSE_BIAS
#include "tt_eager/tt_dnn/kernels/dataflow/reader_bmm_single_core_bias.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

FORCE_INLINE void read_weight_blocks_inner_h_dim(uint32_t cb_id_weight,
uint32_t num_blocks_weight_h,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdint.h>
#include "dataflow_api.h"
#include "debug/dprint.h"
// #include "debug/dprint.h"

// TODO: FORCE INLINE
inline void read_weight_blocks_inner_h_dim(uint32_t cb_id_weight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include "dataflow_api.h"
#include "hostdevcommon/common_values.hpp"
#include "debug/dprint.h"
// #include "debug/dprint.h"

FORCE_INLINE void generate_bcast_scaler_c() {
constexpr uint32_t cb_in_4 = tt::CB::c_in4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdint>
#include "dataflow_api.h"

#include "debug/dprint.h"
// #include "debug/dprint.h"

// SliceRange srr = SliceRange{ .h0 = 0, .h1 = 1, .hs = 8, .w0 = 0, .w1 = 32, .ws = 1 };
// SliceRange srt = SliceRange{ .h0 = 0, .h1 = 4, .hs = 1, .w0 = 0, .w1 = 8, .ws = 1 };
Expand Down Expand Up @@ -127,8 +127,8 @@ void kernel_main() {

// NOTE: batch is folded in

DPRINT << "NOC coords 0: " << (uint) my_x[0] << "," << (uint) my_y[0] << ENDL();
DPRINT << "NOC coords 1: " << (uint) my_x[1] << "," << (uint) my_y[1] << ENDL();
// DPRINT << "NOC coords 0: " << (uint) my_x[0] << "," << (uint) my_y[0] << ENDL();
// DPRINT << "NOC coords 1: " << (uint) my_x[1] << "," << (uint) my_y[1] << ENDL();

uint32_t core_out_w_i_start = get_arg_val<int32_t>(38);
uint32_t core_out_h_i_start = get_arg_val<int32_t>(39);
Expand Down
Loading

0 comments on commit 1ed70ec

Please sign in to comment.