From b59ea50709343c79ee81695b6f32219a244a4b27 Mon Sep 17 00:00:00 2001 From: Almeet Bhullar Date: Thu, 16 May 2024 17:17:47 +0000 Subject: [PATCH] #8560: add blackhole soc desc and prelim blackhome core desc yamls --- tt_metal/common/core_descriptor.hpp | 6 +- tt_metal/common/test_common.hpp | 2 + .../core_descriptors/blackhole_140_arch.yaml | 41 +++++++++ .../blackhole_versim_1x1_arch.yaml | 21 +++++ .../soc_descriptors/blackhole_140_arch.yaml | 86 +++++++++++++++++++ .../blackhole_versim_1x1_arch.yaml | 67 +++++++++++++++ .../soc_descriptors/wormhole_b0_80_arch.yaml | 2 +- 7 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 tt_metal/core_descriptors/blackhole_140_arch.yaml create mode 100644 tt_metal/core_descriptors/blackhole_versim_1x1_arch.yaml create mode 100644 tt_metal/soc_descriptors/blackhole_140_arch.yaml create mode 100644 tt_metal/soc_descriptors/blackhole_versim_1x1_arch.yaml diff --git a/tt_metal/common/core_descriptor.hpp b/tt_metal/common/core_descriptor.hpp index 128661fe4ca..66c0c92e0b6 100644 --- a/tt_metal/common/core_descriptor.hpp +++ b/tt_metal/common/core_descriptor.hpp @@ -48,6 +48,7 @@ inline std::string get_core_descriptor_file(const tt::ARCH &arch) { case tt::ARCH::GRAYSKULL: return tt_metal_home + "tt_metal/core_descriptors/grayskull_versim_1x1_arch.yaml"; case tt::ARCH::WORMHOLE: throw std::runtime_error("WORMHOLE arch not supported"); case tt::ARCH::WORMHOLE_B0: return tt_metal_home + "tt_metal/core_descriptors/wormhole_b0_versim_1x1_arch.yaml"; + case tt::ARCH::BLACKHOLE: return tt_metal_home + "tt_metal/core_descriptors/blackhole_versim_1x1_arch.yaml"; default: throw std::runtime_error("Unsupported device arch"); }; } else { @@ -57,6 +58,7 @@ inline std::string get_core_descriptor_file(const tt::ARCH &arch) { case tt::ARCH::GRAYSKULL: return tt_metal_home + "tt_metal/core_descriptors/grayskull_120_arch.yaml"; case tt::ARCH::WORMHOLE: throw std::runtime_error("WORMHOLE arch not supported"); case tt::ARCH::WORMHOLE_B0: return tt_metal_home + wh_arch; + case tt::ARCH::BLACKHOLE: return tt_metal_home + "tt_metal/core_descriptors/blackhole_140_arch.yaml"; default: throw std::runtime_error("Unsupported device arch"); }; } @@ -66,7 +68,9 @@ inline std::string get_core_descriptor_file(const tt::ARCH &arch) { inline const std::string get_product_name(tt::ARCH arch, uint32_t num_harvested_rows) { const static std::map> product_name = { {tt::ARCH::GRAYSKULL, {{0, "E150"}, {2, "E75"}}}, - {tt::ARCH::WORMHOLE_B0, {{0, "galaxy"}, {1, "nebula_x1"}, {2, "nebula_x2"}}}}; + {tt::ARCH::WORMHOLE_B0, {{0, "galaxy"}, {1, "nebula_x1"}, {2, "nebula_x2"}}}, + {tt::ARCH::BLACKHOLE, {{0, "blackhole"}}} // TODO (abhullar): revisit blackhole product names + }; return product_name.at(arch).at(num_harvested_rows); } diff --git a/tt_metal/common/test_common.hpp b/tt_metal/common/test_common.hpp index 9b53e4425d7..b738460f425 100644 --- a/tt_metal/common/test_common.hpp +++ b/tt_metal/common/test_common.hpp @@ -40,6 +40,7 @@ inline std::string get_soc_description_file(const tt::ARCH &arch, tt::TargetDevi case tt::ARCH::GRAYSKULL: return tt_metal_home + "tt_metal/soc_descriptors/grayskull_versim_1x1_arch.yaml"; case tt::ARCH::WORMHOLE: throw std::runtime_error("WORMHOLE arch not supported"); case tt::ARCH::WORMHOLE_B0: return tt_metal_home + "tt_metal/soc_descriptors/wormhole_b0_versim_1x1_arch.yaml"; + case tt::ARCH::BLACKHOLE: return tt_metal_home + "tt_metal/soc_descriptors/blackhole_versim_1x1_arch.yaml"; default: throw std::runtime_error("Unsupported device arch"); }; } else { @@ -49,6 +50,7 @@ inline std::string get_soc_description_file(const tt::ARCH &arch, tt::TargetDevi case tt::ARCH::GRAYSKULL: return tt_metal_home + "tt_metal/soc_descriptors/grayskull_120_arch.yaml"; case tt::ARCH::WORMHOLE: throw std::runtime_error("WORMHOLE arch not supported"); case tt::ARCH::WORMHOLE_B0: return tt_metal_home + "tt_metal/soc_descriptors/wormhole_b0_80_arch.yaml"; + case tt::ARCH::BLACKHOLE: return tt_metal_home + "tt_metal/soc_descriptors/blackhole_140_arch.yaml"; default: throw std::runtime_error("Unsupported device arch"); }; } diff --git a/tt_metal/core_descriptors/blackhole_140_arch.yaml b/tt_metal/core_descriptors/blackhole_140_arch.yaml new file mode 100644 index 00000000000..b47085ceae8 --- /dev/null +++ b/tt_metal/core_descriptors/blackhole_140_arch.yaml @@ -0,0 +1,41 @@ +# Anything using [[#, #]] is logical coordinates (Can be relative) +# relative index: 0 means first row, -1 means last row of functional grid... + +# product name: +# num of HW command queues: +# core descriptor config + +blackhole: + 1: + l1_bank_size: + 1376256 + + compute_with_storage_grid_range: # Logical only start and end [x, y] + start: [0, 0] + end: [7, 6] + + storage_cores: # Relative to grid of tensix cores + [] + + dispatch_cores: + [] + + dispatch_core_type: + "tensix" + + 2: + l1_bank_size: + 1376256 + + compute_with_storage_grid_range: # Logical only start and end [x, y] + start: [0, 0] + end: [7, 6] + + storage_cores: # Relative to grid of tensix cores + [] + + dispatch_cores: + [] + + dispatch_core_type: + "tensix" diff --git a/tt_metal/core_descriptors/blackhole_versim_1x1_arch.yaml b/tt_metal/core_descriptors/blackhole_versim_1x1_arch.yaml new file mode 100644 index 00000000000..0301126f86b --- /dev/null +++ b/tt_metal/core_descriptors/blackhole_versim_1x1_arch.yaml @@ -0,0 +1,21 @@ +# Anything using [[#, #]] is logical coordinates (Can be relative) +# relative index: 0 means first row, -1 means last row of functional grid... + +# product name: +# num of HW command queues: +# core descriptor config + +blackhole: + 1: + l1_bank_size: + 1376256 + + compute_with_storage_grid_range: + start: [0, 0] + end: [0, 0] + + storage_cores: + [] + + dispatch_cores: + [] diff --git a/tt_metal/soc_descriptors/blackhole_140_arch.yaml b/tt_metal/soc_descriptors/blackhole_140_arch.yaml new file mode 100644 index 00000000000..6113b2b8077 --- /dev/null +++ b/tt_metal/soc_descriptors/blackhole_140_arch.yaml @@ -0,0 +1,86 @@ +# soc-descriptor yaml +# Anything using [#-#] is noc coordinates +# Anything using [[#, #]] is logical coordinates (Can be relative) +# relative index: 0 means first row, -1 means last row of functional grid... +grid: + x_size: 17 + y_size: 12 + +arc: + [ 8-0 ] + +pcie: + [ 11-0 ] + +dram: + [ + [0-0, 0-1, 0-11], + [0-2, 0-10, 0-3], + [0-9, 0-4, 0-8], + [0-5, 0-7, 0-6], + [9-0, 9-1, 9-11], + [9-2, 9-10, 9-3], + [9-9, 9-4, 9-8], + [9-5, 9-7, 9-6], + ] + +dram_preferred_eth_endpoint: + [ 0-1, 0-2, 0-4, 0-5, 9-1, 9-2, 9-4, 9-5 ] + +dram_preferred_worker_endpoint: + [ 0-11, 0-3, 0-8, 0-6, 9-11, 9-3, 9-8, 9-6 ] + +dram_address_offsets: + [ 0, 0, 0, 0, 0, 0, 0, 0 ] + +eth: + [ + 1-1, 2-1, 3-1, 4-1, 5-1, 6-1, 7-1, 10-1, 11-1, 12-1, 13-1, 14-1, 15-1, 16-1, + ] + +functional_workers: + [ + 1-2, 2-2, 3-2, 4-2, 5-2, 6-2, 7-2, 10-2, 11-2, 12-2, 13-2, 14-2, 15-2, 16-2, + 1-3, 2-3, 3-3, 4-3, 5-3, 6-3, 7-3, 10-3, 11-3, 12-3, 13-3, 14-3, 15-3, 16-3, + 1-4, 2-4, 3-4, 4-4, 5-4, 6-4, 7-4, 10-4, 11-4, 12-4, 13-4, 14-4, 15-4, 16-4, + 1-5, 2-5, 3-5, 4-5, 5-5, 6-5, 7-5, 10-5, 11-5, 12-5, 13-5, 14-5, 15-5, 16-5, + 1-6, 2-6, 3-6, 4-6, 5-6, 6-6, 7-6, 10-6, 11-6, 12-6, 13-6, 14-6, 15-6, 16-6, + 1-7, 2-7, 3-7, 4-7, 5-7, 6-7, 7-7, 10-7, 11-7, 12-7, 13-7, 14-7, 15-7, 16-7, + 1-8, 2-8, 3-8, 4-8, 5-8, 6-8, 7-8, 10-8, 11-8, 12-8, 13-8, 14-8, 15-8, 16-8, + 1-9, 2-9, 3-9, 4-9, 5-9, 6-9, 7-9, 10-9, 11-9, 12-9, 13-9, 14-9, 15-9, 16-9, + 1-10, 2-10, 3-10, 4-10, 5-10, 6-10, 7-10, 10-10, 11-10, 12-10, 13-10, 14-10, 15-10, 16-10, + 1-11, 2-11, 3-11, 4-11, 5-11, 6-11, 7-11, 10-11, 11-11, 12-11, 13-11, 14-11, 15-11, 16-11, + ] + +harvested_workers: + [] + +router_only: + [ + 1-0, 2-0, 3-0, 4-0, 5-0, 6-0, 7-0, 10-0, 12-0, 13-0, 14-0, 15-0, 16-0, + 8-1, 8-2, 8-3, 8-4, 8-5, 8-6, 8-7, 8-8, 8-9, 8-10, 8-11 + ] + +worker_l1_size: + 1499136 + +dram_bank_size: + 4294967296 + +eth_l1_size: + 262144 + +arch_name: BLACKHOLE + +features: + noc: + translation_id_enabled: True + unpacker: + version: 2 + inline_srca_trans_without_srca_trans_instr: True + math: + dst_size_alignment: 32768 + packer: + version: 2 + overlay: + version: 2 diff --git a/tt_metal/soc_descriptors/blackhole_versim_1x1_arch.yaml b/tt_metal/soc_descriptors/blackhole_versim_1x1_arch.yaml new file mode 100644 index 00000000000..aca55c5fc49 --- /dev/null +++ b/tt_metal/soc_descriptors/blackhole_versim_1x1_arch.yaml @@ -0,0 +1,67 @@ +# soc-descriptor yaml +# Anything using [#-#] is noc coordinates +# Anything using [[#, #]] is logical coordinates (Can be relative) +# relative index: 0 means first row, -1 means last row of functional grid... +grid: + x_size: 17 + y_size: 12 + +arc: + [ 8-0 ] + +pcie: + [ 11-0 ] + +dram: + [ + [0-0, 0-1], + ] + +dram_preferred_eth_endpoint: + [ 0-0 ] + +dram_preferred_worker_endpoint: + [ 0-1 ] + +dram_address_offsets: + [ 0 ] + +eth: + [ ] + +functional_workers: + [ + 1-2 + ] + +harvested_workers: + [] + +router_only: + [ + 1-0 + ] + +worker_l1_size: + 1499136 + +dram_bank_size: + 4294967296 + +eth_l1_size: + 262144 + +arch_name: BLACKHOLE + +features: + noc: + translation_id_enabled: True + unpacker: + version: 2 + inline_srca_trans_without_srca_trans_instr: True + math: + dst_size_alignment: 32768 + packer: + version: 2 + overlay: + version: 2 diff --git a/tt_metal/soc_descriptors/wormhole_b0_80_arch.yaml b/tt_metal/soc_descriptors/wormhole_b0_80_arch.yaml index 3e65525ce0e..4cee2c26505 100644 --- a/tt_metal/soc_descriptors/wormhole_b0_80_arch.yaml +++ b/tt_metal/soc_descriptors/wormhole_b0_80_arch.yaml @@ -1,4 +1,4 @@ - # soc-descriptor yaml +# soc-descriptor yaml # Anything using [#-#] is noc coordinates # Anything using [[#, #]] is logical coordinates (Can be relative) # relative index: 0 means first row, -1 means last row of functional grid...