shithub: opus

Download patch

ref: 5f8201c71ee81a9eb7bb302d1bd72fe15678d213
parent: 6a9831a6b038638266165dc1e9f115678f0b330e
author: Jan Buethe <jbuethe@amazon.de>
date: Mon Jan 22 10:12:26 EST 2024

OSCE_MAX_RNN_UNITS now derived from osce model parameters

--- a/dnn/nnet.c
+++ b/dnn/nnet.c
@@ -42,7 +42,7 @@
 #include "vec.h"
 
 #ifdef ENABLE_OSCE
-#include "osce_config.h"
+#include "osce.h"
 #endif
 
 #ifdef NO_OPTIMIZATIONS
--- a/dnn/osce.h
+++ b/dnn/osce.h
@@ -52,10 +52,13 @@
 
 #if !defined(DISABLE_NOLACE)
 #define OSCE_DEFAULT_METHOD OSCE_METHOD_NOLACE
+#define OSCE_MAX_RNN_NEURONS NOLACE_FNET_GRU_STATE_SIZE
 #elif !defined(DISABLE_LACE)
 #define OSCE_DEFAULT_METHOD OSCE_METHOD_LACE
+#define OSCE_MAX_RNN_NEURONS LACE_FNET_GRU_STATE_SIZE
 #else
 #define OSCE_DEFAULT_METHOD OSCE_METHOD_NONE
+#define OSCE_MAX_RNN_NEURONS 0
 #endif
 
 
--- a/dnn/osce_config.h
+++ b/dnn/osce_config.h
@@ -28,8 +28,6 @@
 #ifndef OSCE_CONFIG
 #define OSCE_CONFIG
 
-#define OSCE_MAX_RNN_NEURONS 256
-
 #define OSCE_FEATURES_MAX_HISTORY 350
 #define OSCE_FEATURE_DIM 93
 #define OSCE_MAX_FEATURE_FRAMES 4
--