Skip to contentSkip to conversation

tidl: Detect AM571x, to invoke TIDL classification demo with only one DSP

PATCH New Djordje Senicic 1 participant 1 message Dec 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tidl: Detect AM571x, to invoke TIDL classification demo with only one DSP

---
 tidl_apps/tidl_demo_livecam/runTidlLiveCam.sh            | 9 ++++++++-
 .../runTidlStaticImg_dsponly.sh                          | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
tidl_apps/tidl_demo_livecam/runTidlLiveCam.sh +8 -1
index e225519..6f5b464 100644
@@ -1,3 +1,10 @@
+numdsp=2
+if cat /proc/device-tree/model | grep "AM571"
+then
+  numdsp=1
+fi
+echo "NUMDSPs is $numdsp"
+
 cd /usr/share/ti/tidl/examples/classification
 
-./tidl_classification -g 1 -d 2 -e 0 -l ./imagenet.txt -s ./classlist.txt -i 1 -c ./stream_config_j11_v2.txt
+./tidl_classification -g 1 -d $numdsp -e 0 -l ./imagenet.txt -s ./classlist.txt -i 1 -c ./stream_config_j11_v2.txt
tidl_apps/tidl_demo_staticimg_dsponly/runTidlStaticImg_dsponly.sh +8 -1
index 64e3c68..4819ace 100644
@@ -1,3 +1,10 @@
+numdsp=2
+if cat /proc/device-tree/model | grep "AM571"
+then
+  numdsp=1
+fi
+echo "NUMDSPs is $numdsp"
+
 cd /usr/share/ti/tidl/examples/classification
 
-./tidl_classification -g 1 -d 2 -e 0 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
+./tidl_classification -g 1 -d $numdsp -e 0 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
Signature · 1 line
2.17.1