Skip to content

Commit 7d22ab5

Browse files
yuexiaofyuexiaofan
andauthored
[Feature](mlu-ops): kernel.h modify, combine nram and wram to perf for split (#1224)
Co-authored-by: yuexiaofan <[email protected]>
1 parent 1f7a0e8 commit 7d22ab5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kernels/kernel.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,19 @@
6969

7070
#ifdef __BANG_ARCH__
7171
#define MAX_NRAM_SIZE (__MLU_NRAM_SIZE__ * 1024 - REM_FOR_STACK)
72+
#if __BANG_ARCH__ > 592
73+
#define MAX_UNIFIED_NRAM_SIZE (MAX_NRAM_SIZE + MAX_WRAM_SIZE)
74+
#else
75+
#define MAX_UNIFIED_NRAM_SIZE MAX_NRAM_SIZE
76+
#endif
7277
#if __MLU_SRAM_SIZE__ == 0
7378
#define MAX_SRAM_SIZE 0
7479
#else
7580
#define MAX_SRAM_SIZE (__MLU_SRAM_SIZE__ * 1024 - REM_FOR_STACK)
7681
#endif
7782
#else // __BANG_ARCH__
7883
#define MAX_NRAM_SIZE (384 * 1024) // 384KB, initialization value
84+
#define MAX_UNIFIED_NRAM_SIZE MAX_NRAM_SIZE // 384KB, initialization value
7985
#define MAX_SRAM_SIZE (1920 * 1024) // 1920KB,initialization value
8086
#endif // __BANG_ARCH__
8187

0 commit comments

Comments
 (0)