- EVE and DSP count is reported by opencl example 'platforms'
- For several scripts, TIDL network heap size is adjusted to allow execution on 
BBAI (CMEM=384MB)

Signed-off-by: Djordje Senicic <[email protected]>
---
 .../tidl_demo_dogbreeds/runTidlDogBreeds.sh      | 16 ++++++++--------
 .../tidl_demo_livecam_lg2/runTidlLiveCam_lg2.sh  |  9 +++++++--
 tidl_apps/tidl_demo_objdet/runTidlObjdet.sh      |  7 +++++--
 .../runTidlObjdet_livecam.sh                     |  6 ++++--
 .../tidl_demo_pnexamples/runTidlPnExamples.sh    |  5 +++++
 tidl_apps/tidl_demo_segment/runTidlSegment.sh    |  8 ++++++--
 .../tidl_demo_staticimg/runTidlStaticImg.sh      |  7 +++++--
 .../runTidlStaticImg_lg2.sh                      |  9 +++++++--
 8 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/tidl_apps/tidl_demo_dogbreeds/runTidlDogBreeds.sh 
b/tidl_apps/tidl_demo_dogbreeds/runTidlDogBreeds.sh
index 20bc008..133062e 100644
--- a/tidl_apps/tidl_demo_dogbreeds/runTidlDogBreeds.sh
+++ b/tidl_apps/tidl_demo_dogbreeds/runTidlDogBreeds.sh
@@ -1,14 +1,14 @@
 cd /usr/share/ti/tidl/examples/classification
-
-if cat /proc/device-tree/model | grep "AM574"
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+if ((numeve > 0))
 then
-  ./tidl_classification -g 2 -d 1 -e 2 -l ./toydogsnet.txt -s 
./toydogsclasses.txt -i ./clips/toydogs_854x480.mp4 -c 
./stream_config_toydogs.txt
+  echo "NUMEVEs is $numeve"
+  echo "NUMDSPs is $numdsp"
+  export TIDL_NETWORK_HEAP_SIZE_EVE=56623104
+  export TIDL_NETWORK_HEAP_SIZE_DSP=56623104
+  ./tidl_classification -g 2 -d 1 -e $numeve -l ./toydogsnet.txt -s 
./toydogsclasses.txt -i ./clips/toydogs_854x480.mp4 -c 
./stream_config_toydogs.txt
 else
-  numdsp=2
-  if cat /proc/device-tree/model | grep "AM571"
-  then
-    numdsp=1
-  fi
   echo "NUMDSPs is $numdsp"
   ./tidl_classification -g 1 -d $numdsp -e 0 -l ./toydogsnet.txt -s 
./toydogsclasses.txt -i ./clips/toydogs_854x480.mp4 -c 
./stream_config_toydogs.txt
 fi
diff --git a/tidl_apps/tidl_demo_livecam_lg2/runTidlLiveCam_lg2.sh 
b/tidl_apps/tidl_demo_livecam_lg2/runTidlLiveCam_lg2.sh
index 9dfd098..fe5e59c 100644
--- a/tidl_apps/tidl_demo_livecam_lg2/runTidlLiveCam_lg2.sh
+++ b/tidl_apps/tidl_demo_livecam_lg2/runTidlLiveCam_lg2.sh
@@ -1,3 +1,8 @@
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+export TIDL_NETWORK_HEAP_SIZE_EVE=56623104
+export TIDL_NETWORK_HEAP_SIZE_DSP=56623104
+echo "NUMEVEs is $numeve"
+echo "NUMDSPs is $numdsp"
 cd /usr/share/ti/tidl/examples/classification
-
-./tidl_classification -g 2 -d 1 -e 2 -l ./imagenet.txt -s ./classlist.txt -i 1 
-c ./stream_config_j11_v2.txt
+./tidl_classification -g 2 -d $numdsp -e $numeve -l ./imagenet.txt -s 
./classlist.txt -i 1 -c ./stream_config_j11_v2.txt
diff --git a/tidl_apps/tidl_demo_objdet/runTidlObjdet.sh 
b/tidl_apps/tidl_demo_objdet/runTidlObjdet.sh
index 15bf433..8f9a721 100644
--- a/tidl_apps/tidl_demo_objdet/runTidlObjdet.sh
+++ b/tidl_apps/tidl_demo_objdet/runTidlObjdet.sh
@@ -1,6 +1,9 @@
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
 cd /usr/share/ti/tidl/examples/ssd_multibox
-if cat /proc/device-tree/model | grep "AM574"
+if ((numeve > 0))
 then
-  ./ssd_multibox -p 40 -d 1 -e 2 -f 1000 -i ./clips/pexels_videos_3623.mp4
+  echo "NUMEVEs is $numeve"
+  ./ssd_multibox -p 40 -d 1 -e $numeve -f 1000 -i 
./clips/pexels_videos_3623.mp4
 fi
 
diff --git a/tidl_apps/tidl_demo_objdet_livecam/runTidlObjdet_livecam.sh 
b/tidl_apps/tidl_demo_objdet_livecam/runTidlObjdet_livecam.sh
index 88ee369..7826628 100644
--- a/tidl_apps/tidl_demo_objdet_livecam/runTidlObjdet_livecam.sh
+++ b/tidl_apps/tidl_demo_objdet_livecam/runTidlObjdet_livecam.sh
@@ -1,6 +1,8 @@
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
 cd /usr/share/ti/tidl/examples/ssd_multibox
-if cat /proc/device-tree/model | grep "AM574"
+if $((numeve > 0))
 then
-  ./ssd_multibox -p 40 -d 1 -e 2 -f 1000 -i camera1
+  ./ssd_multibox -p 40 -d 1 -e $numeve -f 1000 -i camera1
 fi
 
diff --git a/tidl_apps/tidl_demo_pnexamples/runTidlPnExamples.sh 
b/tidl_apps/tidl_demo_pnexamples/runTidlPnExamples.sh
index 7171f53..668459d 100644
--- a/tidl_apps/tidl_demo_pnexamples/runTidlPnExamples.sh
+++ b/tidl_apps/tidl_demo_pnexamples/runTidlPnExamples.sh
@@ -1,3 +1,8 @@
+xport numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+export TIDL_NETWORK_HEAP_SIZE_EVE=56623104
+export TIDL_NETWORK_HEAP_SIZE_DSP=56623104
+
 cd /usr/share/ti/tidl/examples/classification
 
 ./tidl_classification -g 2 -d 1 -e 1 -l ./imagenet.txt -s ./classlist.txt -i 
./clips/test2.mp4 -c ./stream_config_j11_v2.txt
diff --git a/tidl_apps/tidl_demo_segment/runTidlSegment.sh 
b/tidl_apps/tidl_demo_segment/runTidlSegment.sh
index d83f03d..397eaf9 100644
--- a/tidl_apps/tidl_demo_segment/runTidlSegment.sh
+++ b/tidl_apps/tidl_demo_segment/runTidlSegment.sh
@@ -1,5 +1,9 @@
-cd /usr/share/ti/tidl/examples/segmentation
-if cat /proc/device-tree/model | grep "AM574"
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+if ((numeve > 0))
 then
+  echo "NUMEVEs is $numeve"
+  echo "NUMDSPs is $numdsp"
+  cd /usr/share/ti/tidl/examples/segmentation
   ./segmentation -i ./clips/traffic_pixabay_298.mp4 -f 2000 -w 720
 fi
diff --git a/tidl_apps/tidl_demo_staticimg/runTidlStaticImg.sh 
b/tidl_apps/tidl_demo_staticimg/runTidlStaticImg.sh
index 7d017d4..ed2597b 100644
--- a/tidl_apps/tidl_demo_staticimg/runTidlStaticImg.sh
+++ b/tidl_apps/tidl_demo_staticimg/runTidlStaticImg.sh
@@ -1,3 +1,6 @@
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+export TIDL_NETWORK_HEAP_SIZE_EVE=56623104
+export TIDL_NETWORK_HEAP_SIZE_DSP=56623104
 cd /usr/share/ti/tidl/examples/classification
-
-./tidl_classification -g 1 -d 2 -e 2 -l ./imagenet.txt -s ./classlist.txt -i 
./clips/test10.mp4 -c ./stream_config_j11_v2.txt
+./tidl_classification -g 1 -d $numdsp -e $numeve -l ./imagenet.txt -s 
./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
diff --git a/tidl_apps/tidl_demo_staticimg_lg2/runTidlStaticImg_lg2.sh 
b/tidl_apps/tidl_demo_staticimg_lg2/runTidlStaticImg_lg2.sh
index 4824722..c8a9386 100755
--- a/tidl_apps/tidl_demo_staticimg_lg2/runTidlStaticImg_lg2.sh
+++ b/tidl_apps/tidl_demo_staticimg_lg2/runTidlStaticImg_lg2.sh
@@ -1,3 +1,8 @@
+export numeve=$(/usr/share/ti/examples/opencl/platforms/platforms  | grep 
"Embedded Vision Engine" | wc -l)
+export numdsp=$(find /proc/device-tree/ocp/ -name "dsp_system*" | wc -l)
+export TIDL_NETWORK_HEAP_SIZE_EVE=56623104
+export TIDL_NETWORK_HEAP_SIZE_DSP=56623104
+echo "NUMEVEs is $numeve"
+echo "NUMDSPs is $numdsp"
 cd /usr/share/ti/tidl/examples/classification
-
-./tidl_classification -g 2 -d 1 -e 2 -l ./imagenet.txt -s ./classlist.txt -i 
./clips/test10.mp4 -c ./stream_config_j11_v2.txt
+./tidl_classification -g 2 -d 1 -e $numeve -l ./imagenet.txt -s 
./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
-- 
2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to