Re-enable quant models

Re-enable quant models as upstream bugs have been fixed.

Bug: 198476354, 200299917
Change-Id: Ia86e50c38e6a4ead45c093d907eca4ee19c62afd
diff --git a/samples/quant_model_embedding/CMakeLists.txt b/samples/quant_model_embedding/CMakeLists.txt
index a391b7d..91715ae 100644
--- a/samples/quant_model_embedding/CMakeLists.txt
+++ b/samples/quant_model_embedding/CMakeLists.txt
@@ -3,57 +3,52 @@
 # are for RVV support.
 #-------------------------------------------------------------------------------
 
-# TODO(b/200299917): Temporarily disable quant models
-return()
-
 if(NOT ${BUILD_WITH_SPRINGBOK})
-# TODO(b/198476354): uncomment below after operator tosa.clz is supported
-#  springbok_bytecode_module(
-#    NAME
-#      mobilenet_v2_bytecode_module_dylib
-#    SRC
-#      "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/mobilenet_v2_1.0_224_quant.tflite"
-#    C_IDENTIFIER
-#      "samples_quant_model_embedding_mobilenet_v2_bytecode_module_dylib"
-#    FLAGS
-#      "-iree-input-type=tosa"
-#      "-riscv-v-vector-bits-min=512"
-#      "-riscv-v-fixed-length-vector-lmul-max=8"
-#      "-riscv-v-fixed-length-vector-elen-max=32"
-#    PUBLIC
-#  )
+  springbok_bytecode_module(
+    NAME
+      mobilenet_v2_bytecode_module_dylib
+    SRC
+      "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/mobilenet_v2_1.0_224_quant.tflite"
+    C_IDENTIFIER
+      "samples_quant_model_embedding_mobilenet_v2_bytecode_module_dylib"
+    FLAGS
+      "-iree-input-type=tosa"
+      "-riscv-v-vector-bits-min=512"
+      "-riscv-v-fixed-length-vector-lmul-max=8"
+      "-riscv-v-fixed-length-vector-elen-max=32"
+    PUBLIC
+  )
 endif()
 
-# TODO(b/198476354): uncomment below after operator tosa.clz is supported
-# springbok_bytecode_module(
-#  NAME
-#    mobilenet_v1_bytecode_module_dylib
-#  SRC
-#    "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/mobilenet_v1_0.25_224_quant.tflite"
-#  C_IDENTIFIER
-#    "samples_quant_model_embedding_mobilenet_v1_bytecode_module_dylib"
-#  FLAGS
-#    "-iree-input-type=tosa"
-#    "-riscv-v-vector-bits-min=512"
-#    "-riscv-v-fixed-length-vector-lmul-max=8"
-#    "-riscv-v-fixed-length-vector-elen-max=32"
-#  PUBLIC
-# )
+springbok_bytecode_module(
+  NAME
+    mobilenet_v1_bytecode_module_dylib
+  SRC
+    "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/mobilenet_v1_0.25_224_quant.tflite"
+  C_IDENTIFIER
+    "samples_quant_model_embedding_mobilenet_v1_bytecode_module_dylib"
+  FLAGS
+    "-iree-input-type=tosa"
+    "-riscv-v-vector-bits-min=512"
+    "-riscv-v-fixed-length-vector-lmul-max=8"
+    "-riscv-v-fixed-length-vector-elen-max=32"
+  PUBLIC
+)
 
-# springbok_bytecode_module(
-#  NAME
-#    person_detection_bytecode_module_dylib
-#  SRC
-#    "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/person_detection.tflite"
-#  C_IDENTIFIER
-#    "samples_quant_model_embedding_person_detection_bytecode_module_dylib"
-#  FLAGS
-#    "-iree-input-type=tosa"
-#    "-riscv-v-vector-bits-min=512"
-#    "-riscv-v-fixed-length-vector-lmul-max=8"
-#    "-riscv-v-fixed-length-vector-elen-max=32"
-#  PUBLIC
-# )
+springbok_bytecode_module(
+  NAME
+    person_detection_bytecode_module_dylib
+  SRC
+    "$ENV{ROOTDIR}/ml/ml-models-public/quant_models/person_detection.tflite"
+  C_IDENTIFIER
+    "samples_quant_model_embedding_person_detection_bytecode_module_dylib"
+  FLAGS
+    "-iree-input-type=tosa"
+    "-riscv-v-vector-bits-min=512"
+    "-riscv-v-fixed-length-vector-lmul-max=8"
+    "-riscv-v-fixed-length-vector-elen-max=32"
+  PUBLIC
+)
 
 if(${BUILD_INTERNAL_MODELS})
 
@@ -166,42 +161,40 @@
 # Currently only daredevil and semantic_lift can run with springbok (b/196910893)
 
 if(NOT ${BUILD_WITH_SPRINGBOK})
-# TODO(b/198476354): uncomment below after operator tosa.clz is supported
-#  iree_cc_binary(
-#    NAME
-#      mobilenet_v2_embedded_sync
-#    SRCS
-#      "mobilenet_v2.c"
-#    DEPS
-#      ::mobilenet_v2_bytecode_module_dylib_c
-#      samples::util::util
-#  )
+  iree_cc_binary(
+    NAME
+      mobilenet_v2_embedded_sync
+    SRCS
+      "mobilenet_v2.c"
+    DEPS
+      ::mobilenet_v2_bytecode_module_dylib_c
+      samples::util::util
+  )
 endif()
 
-# TODO(b/198476354): uncomment below after operator tosa.clz is supported
-# iree_cc_binary(
-#  NAME
-#    mobilenet_v1_embedded_sync
-#  SRCS
-#    "mobilenet_v1.c"
-#  DEPS
-#    ::mobilenet_v1_bytecode_module_dylib_c
-#    samples::util::util
-#  LINKOPTS
-#    "LINKER:--defsym=__stack_size__=100k"
-# )
+iree_cc_binary(
+  NAME
+    mobilenet_v1_embedded_sync
+  SRCS
+    "mobilenet_v1.c"
+  DEPS
+    ::mobilenet_v1_bytecode_module_dylib_c
+    samples::util::util
+  LINKOPTS
+    "LINKER:--defsym=__stack_size__=100k"
+)
 
-# iree_cc_binary(
-#  NAME
-#    person_detection_embedded_sync
-#  SRCS
-#    "person_detection.c"
-#  DEPS
-#    ::person_detection_bytecode_module_dylib_c
-#    samples::util::util
-#  LINKOPTS
-#    "LINKER:--defsym=__stack_size__=100k"
-# )
+iree_cc_binary(
+  NAME
+    person_detection_embedded_sync
+  SRCS
+    "person_detection.c"
+  DEPS
+    ::person_detection_bytecode_module_dylib_c
+    samples::util::util
+  LINKOPTS
+    "LINKER:--defsym=__stack_size__=100k"
+)
 
 if(NOT ${BUILD_INTERNAL_MODELS})
   return()
@@ -228,6 +221,7 @@
     ::barcode_bytecode_module_dylib_c
     samples::util::util
   LINKOPTS
+    "LINKER:--defsym=__dtcm_length__=16M"
     "LINKER:--defsym=__stack_size__=100k"
 )
 
@@ -252,6 +246,7 @@
     ::fssd_25_8bit_v2_bytecode_module_dylib_c
     samples::util::util
   LINKOPTS
+    "LINKER:--defsym=__dtcm_length__=16M"
     "LINKER:--defsym=__stack_size__=100k"
 )