Skip to content

Commit

Permalink
#4889: Change TileSlice printing to only print tile data
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-dma committed Jan 25, 2024
1 parent 92268bc commit cfe78bb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,15 @@ SETPRECISION/FIXED/DEFAULTFLOAT:
HEX/OCT/DEC:
1e240361100123456
SLICE:
TILE: (
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
ptr=122880)
TILE: (
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
ptr=122880)
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
Test Debug Print: Unpack
Basic Types:
[email protected]
Expand All @@ -57,21 +51,15 @@ SETPRECISION/FIXED/DEFAULTFLOAT:
HEX/OCT/DEC:
1e240361100123456
SLICE:
TILE: (
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
ptr=122880)
TILE: (
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
ptr=122880)
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
Test Debug Print: Math
Basic Types:
[email protected]
Expand Down Expand Up @@ -100,21 +88,15 @@ SETPRECISION/FIXED/DEFAULTFLOAT:
HEX/OCT/DEC:
1e240361100123456
SLICE:
TILE: (
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
ptr=122880)
TILE: (
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
ptr=122880)
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
Test Debug Print: Data1
Basic Types:
[email protected]
Expand All @@ -128,21 +110,15 @@ SETPRECISION/FIXED/DEFAULTFLOAT:
HEX/OCT/DEC:
1e240361100123456
SLICE:
TILE: (
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
ptr=122880)
TILE: (
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>
ptr=122880))";
0.122558594 0.127929688 0.490234375 0.51171875
0.245117188 0.255859375 0.98046875 1.0234375
1.9609375 2.046875 7.84375 8.1875
3.921875 4.09375 15.6875 16.375
0.122558594 0.124511719 0.127929688 0.131835938 0.490234375 0.498046875 0.51171875 0.52734375
0.182617188 0.186523438 0.190429688 0.194335938 0.73046875 0.74609375 0.76171875 0.77734375
0.245117188 0.249023438 0.255859375 0.263671875 0.98046875 0.99609375 1.0234375 1.0546875
0.365234375 0.373046875 0.380859375 0.388671875 1.4609375 1.4921875 1.5234375 1.5546875
<TileSlice data truncated due to exceeding max count (32)>)";

static void RunTest(DPrintFixture* fixture, Device* device) {
// Set up program and command queue
Expand Down
4 changes: 0 additions & 4 deletions tt_metal/impl/debug/dprint_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,13 @@ static void PrintTileSlice(ostream& stream, uint8_t* ptr, int hart_id) {
}

TileSliceHostDev<0>* ts = reinterpret_cast<TileSliceHostDev<0>*>(ptr);
stream << "TILE: (" << endl << std::flush;
if (ts->w0_ == 0xFFFF) {
stream << "BAD TILE POINTER" << std::flush;
stream << " count=" << ts->count_ << std::flush;
} else {
uint32_t i = 0;
bool count_exceeded = false;
for (int h = ts->h0_; h < ts->h1_; h += ts->hs_) {
if (ts->w0_ < ts->w1_)
stream << " ";
for (int w = ts->w0_; w < ts->w1_; w += ts->ws_) {
// If the number of data specified by the SliceRange exceeds the number that was
// saved in the print buffer (set by the MAX_COUNT template parameter in the
Expand All @@ -192,7 +189,6 @@ static void PrintTileSlice(ostream& stream, uint8_t* ptr, int hart_id) {
stream << endl;
}
}
stream << endl << " ptr=" << ts->ptr_ << ")" << endl;
} // PrintTileSlice

// Writes a magic value at wpos ptr address for dprint buffer for a specific hart/core/chip
Expand Down

0 comments on commit cfe78bb

Please sign in to comment.