Merge "sw/vec_iree: Merge ITCM and DTCM into TCM."
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14c8046..0e22756 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,10 +26,8 @@
#-------------------------------------------------------------------------------
# Springbok-specific settings
#-------------------------------------------------------------------------------
-set(DTCM_LENGTH "16M" CACHE STRING "DTCM Length (default: 16M)")
-add_link_options("LINKER:--defsym=__dtcm_length__=${DTCM_LENGTH}")
-set(ITCM_LENGTH "512K" CACHE STRING "ITCM (I-mem) Length (default: 512K)")
-add_link_options("LINKER:--defsym=__itcm_length__=${ITCM_LENGTH}")
+set(TCM_LENGTH "16M" CACHE STRING "TCM Length (default: 16M)")
+add_link_options("LINKER:--defsym=__tcm_length__=${TCM_LENGTH}")
set(STACK_SIZE "10K" CACHE STRING "Stack size (default: 10K)")
add_link_options("LINKER:--defsym=__stack_size__=${STACK_SIZE}")
set(SPRINGBOK_LINKER_SCRIPT "$ENV{ROOTDIR}/sw/vec/springbok/springbok.ld" CACHE PATH "Springbok linker script path (default: springbok.ld)")
diff --git a/samples/float_model/CMakeLists.txt b/samples/float_model/CMakeLists.txt
index cfa3572..d7fd3dc 100644
--- a/samples/float_model/CMakeLists.txt
+++ b/samples/float_model/CMakeLists.txt
@@ -71,40 +71,37 @@
#
# to increase it.
-# TODO(lundong): Temporarily disable some models due to ITCM overflow
-#iree_cc_binary(
-# NAME
-# mobilenet_v1_bytecode_static
-# SRCS
-# "mobilenet_v1.c"
-# DEPS
-# ::mobilenet_v1_bytecode_module_static
-# ::mobilenet_v1_bytecode_module_static_c
-# ::mobilenet_input_c
-# samples::util::util
-# iree::vm::bytecode_module
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=200k"
-#)
+iree_cc_binary(
+ NAME
+ mobilenet_v1_bytecode_static
+ SRCS
+ "mobilenet_v1.c"
+ DEPS
+ ::mobilenet_v1_bytecode_module_static
+ ::mobilenet_v1_bytecode_module_static_c
+ ::mobilenet_input_c
+ samples::util::util
+ iree::vm::bytecode_module
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=200k"
+)
-#iree_cc_binary(
-# NAME
-# mobilenet_v1_emitc_static
-# SRCS
-# "mobilenet_v1.c"
-# DEPS
-# ::mobilenet_v1_c_module_static_c
-# ::mobilenet_v1_c_module_static_emitc
-# ::mobilenet_input_c
-# samples::util::util
-# "m"
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=200k"
-# COPTS
-# "-DBUILD_EMITC"
-#)
+iree_cc_binary(
+ NAME
+ mobilenet_v1_emitc_static
+ SRCS
+ "mobilenet_v1.c"
+ DEPS
+ ::mobilenet_v1_c_module_static_c
+ ::mobilenet_v1_c_module_static_emitc
+ ::mobilenet_input_c
+ samples::util::util
+ "m"
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=200k"
+ COPTS
+ "-DBUILD_EMITC"
+)
iree_cc_binary(
NAME
diff --git a/samples/float_model/mobilenet_v1_bytecode_static_test.txt b/samples/float_model/mobilenet_v1_bytecode_static_test.txt
index 5bf5279..791e8be 100644
--- a/samples/float_model/mobilenet_v1_bytecode_static_test.txt
+++ b/samples/float_model/mobilenet_v1_bytecode_static_test.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/float_model/mobilenet_v1_bytecode_static 2>&1 | tee %t
// RUN: cat %t | FileCheck %s
// CHECK: {{Image prediction result is: id: 178}}
-// XFAIL: *
diff --git a/samples/float_model/mobilenet_v1_emitc_static_test.txt b/samples/float_model/mobilenet_v1_emitc_static_test.txt
index 08263e3..101926e 100644
--- a/samples/float_model/mobilenet_v1_emitc_static_test.txt
+++ b/samples/float_model/mobilenet_v1_emitc_static_test.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/float_model/mobilenet_v1_emitc_static 2>&1 | tee %t
// RUN: cat %t | FileCheck %s
// CHECK: {{Image prediction result is: id: 178}}
-// XFAIL: *
diff --git a/samples/quant_model/CMakeLists.txt b/samples/quant_model/CMakeLists.txt
index 56d3b1e..477cb38 100644
--- a/samples/quant_model/CMakeLists.txt
+++ b/samples/quant_model/CMakeLists.txt
@@ -207,7 +207,6 @@
iree::vm::bytecode_module
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
)
@@ -222,45 +221,41 @@
::mobilenet_v1_c_module_static_emitc
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
COPTS
"-DBUILD_EMITC"
)
-# TODO(lundong): Temporarily disable some models due to ITCM overflow
-#iree_cc_binary(
-# NAME
-# mobilenet_v2_bytecode_static
-# SRCS
-# "mobilenet_v2.c"
-# DEPS
-# ::mobilenet_quant_input_c
-# ::mobilenet_v2_bytecode_module_static
-# ::mobilenet_v2_bytecode_module_static_c
-# iree::vm::bytecode_module
-# samples::util::util
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=150k"
-#)
+iree_cc_binary(
+ NAME
+ mobilenet_v2_bytecode_static
+ SRCS
+ "mobilenet_v2.c"
+ DEPS
+ ::mobilenet_quant_input_c
+ ::mobilenet_v2_bytecode_module_static
+ ::mobilenet_v2_bytecode_module_static_c
+ iree::vm::bytecode_module
+ samples::util::util
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=150k"
+)
-#iree_cc_binary(
-# NAME
-# mobilenet_v2_emitc_static
-# SRCS
-# "mobilenet_v2.c"
-# DEPS
-# ::mobilenet_quant_input_c
-# ::mobilenet_v2_c_module_static_c
-# ::mobilenet_v2_c_module_static_emitc
-# samples::util::util
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=150k"
-# COPTS
-# "-DBUILD_EMITC"
-#)
+iree_cc_binary(
+ NAME
+ mobilenet_v2_emitc_static
+ SRCS
+ "mobilenet_v2.c"
+ DEPS
+ ::mobilenet_quant_input_c
+ ::mobilenet_v2_c_module_static_c
+ ::mobilenet_v2_c_module_static_emitc
+ samples::util::util
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=150k"
+ COPTS
+ "-DBUILD_EMITC"
+)
iree_cc_binary(
NAME
@@ -274,7 +269,6 @@
iree::vm::bytecode_module
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=128k"
)
@@ -289,7 +283,6 @@
::person_detection_quant_input_c
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=128k"
COPTS
"-DBUILD_EMITC"
@@ -310,25 +303,23 @@
iree::vm::bytecode_module
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=150k"
)
-#iree_cc_binary(
-# NAME
-# barcode_emitc_static
-# SRCS
-# "barcode.c"
-# DEPS
-# ::barcode_c_module_static_c
-# ::barcode_c_module_static_emitc
-# iree::samples::util::util
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1100K"
-# "LINKER:--defsym=__stack_size__=100k"
-# COPTS
-# "-DBUILD_EMITC"
-#)
+iree_cc_binary(
+ NAME
+ barcode_emitc_static
+ SRCS
+ "barcode.c"
+ DEPS
+ ::barcode_c_module_static_c
+ ::barcode_c_module_static_emitc
+ iree::samples::util::util
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=100k"
+ COPTS
+ "-DBUILD_EMITC"
+)
iree_cc_binary(
NAME
@@ -343,7 +334,6 @@
samples::audio_prep::mfcc
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
)
@@ -359,7 +349,6 @@
samples::audio_prep::mfcc
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
COPTS
"-DBUILD_EMITC"
@@ -378,7 +367,6 @@
samples::risp4ml::pipeline::pipeline
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
)
@@ -394,42 +382,39 @@
samples::risp4ml::pipeline::pipeline
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
COPTS
"-DBUILD_EMITC"
)
-#iree_cc_binary(
-# NAME
-# scenenet_v2_bytecode_static
-# SRCS
-# "scenenet_v2.c"
-# DEPS
-# ::scenenet_v2_bytecode_module_static
-# ::scenenet_v2_bytecode_module_static_c
-# iree::vm::bytecode_module
-# samples::util::util
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=150k"
-#)
+iree_cc_binary(
+ NAME
+ scenenet_v2_bytecode_static
+ SRCS
+ "scenenet_v2.c"
+ DEPS
+ ::scenenet_v2_bytecode_module_static
+ ::scenenet_v2_bytecode_module_static_c
+ iree::vm::bytecode_module
+ samples::util::util
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=150k"
+)
-#iree_cc_binary(
-# NAME
-# scenenet_v2_emitc_static
-# SRCS
-# "scenenet_v2.c"
-# DEPS
-# ::scenenet_v2_c_module_static_c
-# ::scenenet_v2_c_module_static_emitc
-# samples::util::util
-# LINKOPTS
-# "LINKER:--defsym=__itcm_length__=1500K"
-# "LINKER:--defsym=__stack_size__=150k"
-# COPTS
-# "-DBUILD_EMITC"
-#)
+iree_cc_binary(
+ NAME
+ scenenet_v2_emitc_static
+ SRCS
+ "scenenet_v2.c"
+ DEPS
+ ::scenenet_v2_c_module_static_c
+ ::scenenet_v2_c_module_static_emitc
+ samples::util::util
+ LINKOPTS
+ "LINKER:--defsym=__stack_size__=150k"
+ COPTS
+ "-DBUILD_EMITC"
+)
iree_cc_binary(
NAME
@@ -442,7 +427,6 @@
iree::vm::bytecode_module
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
)
@@ -456,7 +440,6 @@
::semantic_lift_c_module_static_emitc
samples::util::util
LINKOPTS
- "LINKER:--defsym=__itcm_length__=1M"
"LINKER:--defsym=__stack_size__=300k"
COPTS
"-DBUILD_EMITC"
diff --git a/samples/quant_model/barcode_test.txt b/samples/quant_model/barcode_test.txt
index 371abfd..9557b0e 100644
--- a/samples/quant_model/barcode_test.txt
+++ b/samples/quant_model/barcode_test.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/barcode_bytecode_static
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/barcode_emitc_static
// REQUIRES: internal
-// XFAIL: *
diff --git a/samples/quant_model/mobilenet_v2_bytecode_static_test.txt b/samples/quant_model/mobilenet_v2_bytecode_static_test.txt
index a1179ef..fd3b156 100644
--- a/samples/quant_model/mobilenet_v2_bytecode_static_test.txt
+++ b/samples/quant_model/mobilenet_v2_bytecode_static_test.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/mobilenet_v2_bytecode_static 2>&1 | tee %t
// RUN: cat %t | FileCheck %s
// CHECK: {{Image prediction result is: id: 210}}
-// XFAIL: *
diff --git a/samples/quant_model/mobilenet_v2_emitc_static_text.txt b/samples/quant_model/mobilenet_v2_emitc_static_text.txt
index 668458d..1824224 100644
--- a/samples/quant_model/mobilenet_v2_emitc_static_text.txt
+++ b/samples/quant_model/mobilenet_v2_emitc_static_text.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/mobilenet_v2_emitc_static 2>&1 | tee %t
// RUN: cat %t | FileCheck %s
// CHECK: {{Image prediction result is: id: 210}}
-// XFAIL: *
diff --git a/samples/quant_model/scenenet_test.txt b/samples/quant_model/scenenet_test.txt
index 164005d..1be1d7f 100644
--- a/samples/quant_model/scenenet_test.txt
+++ b/samples/quant_model/scenenet_test.txt
@@ -1,4 +1,3 @@
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/scenenet_v2_bytecode_static
// RUN: ${TEST_RUNNER_CMD} ${OUT}/springbok_iree/samples/quant_model/scenenet_v2_emitc_static
// REQUIRES: internal
-// XFAIL: *