-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.hpp
More file actions
21 lines (19 loc) · 978 Bytes
/
common.hpp
File metadata and controls
21 lines (19 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include "common/bfloat16.hpp"
// TODO: Need to determine when/how these will be set.
// I think I might want to keep this constant for a given runtime program graph.
// i.e have the granularity of tokens/messages within streams always be that of a tile.
// Eventually will need to parameterize by the type.
constexpr uint32_t TILE_WIDTH = 32;
constexpr uint32_t TILE_HEIGHT = 32;
constexpr uint32_t TILE_SIZE = TILE_WIDTH * TILE_HEIGHT;
constexpr uint32_t TILE_SIZE_BYTES = TILE_SIZE * sizeof(bfloat16);
constexpr uint32_t TILES_PER_CB = 3; // TODO: Make this parameterized.
constexpr uint32_t IN_CB_START = 0;
constexpr uint32_t INTERMED_CB_START = 8;
constexpr uint32_t OUT_CB_START = 16;
constexpr uint32_t MAX_INPUT_PORTS = 16;
constexpr uint32_t MAX_OUTPUT_PORTS = 16;
constexpr uint8_t MAX_PARALLELIZATION_FACTOR = 1; // Maximum number of cores that a kernel will be parallelized across.
// constexpr uint32_t INVALID = 0;
// constexpr uint32_t VALID = 1;