Skip to content

Commit

Permalink
fix color logic for buffer pages when data is insufficient (multi dev…
Browse files Browse the repository at this point in the history
…ice specific)
  • Loading branch information
aidemsined committed Dec 11, 2024
1 parent 8f8c867 commit 2ed58f6
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import LoadingSpinner from '../LoadingSpinner';
import { BufferPage } from '../../model/APIData';
import SVGBufferRenderer from './SVGBufferRenderer';
import { HistoricalTensor } from '../../model/Graph';
import { getTensorColor } from '../../functions/colorGenerator';
import { getBufferColor, getTensorColor } from '../../functions/colorGenerator';
import getChartData, { pageDataToChunkArray } from '../../functions/getChartData';
import { L1RenderConfiguration } from '../../definitions/PlotConfigurations';
import MemoryPlotRenderer from '../operation-details/MemoryPlotRenderer';
Expand Down Expand Up @@ -89,9 +89,14 @@ const TensorVisualisationComponent: React.FC<TensorVisualisationComponentProps>
const tensor = tensorByAddress?.get(page.address);
page.tensor_id = tensor?.id;
page.color = getTensorColor(tensor?.id);
} else {
} else if (tensorId) {
page.tensor_id = tensorId;
page.color = getTensorColor(tensorId);
}
if (page.tensor_id === undefined) {
page.color = getBufferColor(page.address);
}

buffersByBankId[page.bank_id].push(page);
coordsByBankId[page.bank_id] = { x: page.core_x, y: page.core_y };
});
Expand Down

0 comments on commit 2ed58f6

Please sign in to comment.