Implement WU architecture support

This commit is contained in:
2026-05-25 19:25:05 +08:00
parent 323ed7d7e9
commit 0ad87bde81
35 changed files with 3303 additions and 472 deletions

View File

@@ -88,15 +88,48 @@
`endif
`ifndef NUM_CORES
`define NUM_CORES 8
`define NUM_CORES 1
`endif
`ifndef NUM_WARPS
`define NUM_WARPS 8
`define NUM_WARPS 4
`endif
`ifndef NUM_TENSOR_WARPS
`define NUM_TENSOR_WARPS 2
`endif
`define NUM_SCALAR_WARPS (`NUM_WARPS - `NUM_TENSOR_WARPS)
`define WU_CONFIG_STATIC_ASSERTS \
generate \
if (!(`NUM_WARPS > 0)) begin : g_wu_num_warps_gt_zero \
invalid_NUM_WARPS_must_be_greater_than_zero __wu_config_error(); \
end \
if (!(`NUM_TENSOR_WARPS > 0)) begin : g_wu_num_tensor_warps_gt_zero \
invalid_NUM_TENSOR_WARPS_must_be_greater_than_zero __wu_config_error(); \
end \
if (!(`NUM_TENSOR_WARPS < `NUM_WARPS)) begin : g_wu_num_tensor_warps_lt_num_warps \
invalid_NUM_TENSOR_WARPS_must_be_smaller_than_NUM_WARPS __wu_config_error(); \
end \
if (!(`NUM_SCALAR_WARPS > 0)) begin : g_wu_num_scalar_warps_gt_zero \
invalid_NUM_SCALAR_WARPS_must_be_greater_than_zero __wu_config_error(); \
end \
endgenerate
`define IS_SCALAR_WARP(wid) ((wid) < `NUM_SCALAR_WARPS)
`define IS_TENSOR_WARP(wid) ((wid) >= `NUM_SCALAR_WARPS)
`ifndef TENSOR_NUM_GPRS
`define TENSOR_NUM_GPRS 8
`endif
`ifndef TENSOR_NUM_FPRS
`define TENSOR_NUM_FPRS 8
`endif
`ifndef NUM_THREADS
`define NUM_THREADS 8
`define NUM_THREADS 4
`endif
`ifndef NUM_BARRIERS