aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Zhao2019-09-05 15:40:36 -0500
committerYuan Zhao2019-09-05 15:42:30 -0500
commit268aecd993dec4faec1a414d6aac4c43b0c059ed (patch)
tree623c42b784c5da29f77d7a41d942d809d573c737
parent82fae42570a6559a2bb9eca1347275f67187ccc7 (diff)
downloadtidl-api-268aecd993dec4faec1a414d6aac4c43b0c059ed.tar.gz
tidl-api-268aecd993dec4faec1a414d6aac4c43b0c059ed.tar.xz
tidl-api-268aecd993dec4faec1a414d6aac4c43b0c059ed.zip
More example sizes adjustment with new TIDL lib
- MCT-1217
-rw-r--r--examples/one_eo_per_frame/main.cpp2
-rwxr-xr-xexamples/pybind/imagenet.py2
-rwxr-xr-xexamples/pybind/one_eo_per_frame.py5
-rwxr-xr-xexamples/pybind/two_eo_per_frame.py5
-rwxr-xr-xexamples/pybind/two_eo_per_frame_opt.py5
-rw-r--r--examples/ssd_multibox/main.cpp3
-rw-r--r--examples/two_eo_per_frame/main.cpp2
-rw-r--r--examples/two_eo_per_frame_opt/main.cpp2
8 files changed, 22 insertions, 4 deletions
diff --git a/examples/one_eo_per_frame/main.cpp b/examples/one_eo_per_frame/main.cpp
index c8000d1..2665bb6 100644
--- a/examples/one_eo_per_frame/main.cpp
+++ b/examples/one_eo_per_frame/main.cpp
@@ -101,6 +101,8 @@ bool Run(const string& config_file, int num_eve, int num_dsp,
101 // Heap sizes for this network determined using Configuration::showHeapStats 101 // Heap sizes for this network determined using Configuration::showHeapStats
102 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB 102 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB
103 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB 103 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB
104 // AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
105 if (num_eve > 2) num_eve = 2;
104 106
105 c.numFrames = 16; 107 c.numFrames = 16;
106 108
diff --git a/examples/pybind/imagenet.py b/examples/pybind/imagenet.py
index f249c09..4d83bbe 100755
--- a/examples/pybind/imagenet.py
+++ b/examples/pybind/imagenet.py
@@ -111,7 +111,7 @@ def run(num_eve, num_dsp, configuration, labels_file):
111 111
112 # Heap sizes for this network determined using Configuration.showHeapStats 112 # Heap sizes for this network determined using Configuration.showHeapStats
113 configuration.param_heap_size = (3 << 20) 113 configuration.param_heap_size = (3 << 20)
114 configuration.network_heap_size = (20 << 20) 114 configuration.network_heap_size = (34 << 20)
115 115
116 116
117 try: 117 try:
diff --git a/examples/pybind/one_eo_per_frame.py b/examples/pybind/one_eo_per_frame.py
index 81c9e22..dda9712 100755
--- a/examples/pybind/one_eo_per_frame.py
+++ b/examples/pybind/one_eo_per_frame.py
@@ -54,6 +54,9 @@ def main():
54 54
55 num_dsp = Executor.get_num_devices(DeviceType.DSP) 55 num_dsp = Executor.get_num_devices(DeviceType.DSP)
56 num_eve = Executor.get_num_devices(DeviceType.EVE) 56 num_eve = Executor.get_num_devices(DeviceType.EVE)
57 # AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
58 if num_eve > 2:
59 num_eve = 2
57 60
58 if num_dsp == 0 and num_eve == 0: 61 if num_dsp == 0 and num_eve == 0:
59 print('No TIDL API capable devices available') 62 print('No TIDL API capable devices available')
@@ -93,7 +96,7 @@ def run(num_eve, num_dsp, configuration):
93 96
94 # Heap sizes for this network determined using Configuration.showHeapStats 97 # Heap sizes for this network determined using Configuration.showHeapStats
95 configuration.param_heap_size = (3 << 20) 98 configuration.param_heap_size = (3 << 20)
96 configuration.network_heap_size = (20 << 20) 99 configuration.network_heap_size = (34 << 20)
97 100
98 try: 101 try:
99 print('TIDL API: performing one time initialization ...') 102 print('TIDL API: performing one time initialization ...')
diff --git a/examples/pybind/two_eo_per_frame.py b/examples/pybind/two_eo_per_frame.py
index 953c691..6090d7b 100755
--- a/examples/pybind/two_eo_per_frame.py
+++ b/examples/pybind/two_eo_per_frame.py
@@ -55,10 +55,13 @@ def main():
55 55
56 # Heap sizes for this network determined using Configuration.showHeapStats 56 # Heap sizes for this network determined using Configuration.showHeapStats
57 configuration.param_heap_size = (3 << 20) 57 configuration.param_heap_size = (3 << 20)
58 configuration.network_heap_size = (20 << 20) 58 configuration.network_heap_size = (34 << 20)
59 59
60 num_dsp = Executor.get_num_devices(DeviceType.DSP) 60 num_dsp = Executor.get_num_devices(DeviceType.DSP)
61 num_eve = Executor.get_num_devices(DeviceType.EVE) 61 num_eve = Executor.get_num_devices(DeviceType.EVE)
62 # AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
63 if num_eve > 2:
64 num_eve = 2
62 65
63 if num_dsp == 0 or num_eve == 0: 66 if num_dsp == 0 or num_eve == 0:
64 print('This example requires EVEs and DSPs.') 67 print('This example requires EVEs and DSPs.')
diff --git a/examples/pybind/two_eo_per_frame_opt.py b/examples/pybind/two_eo_per_frame_opt.py
index 2819555..1202511 100755
--- a/examples/pybind/two_eo_per_frame_opt.py
+++ b/examples/pybind/two_eo_per_frame_opt.py
@@ -51,10 +51,13 @@ def main():
51 51
52 # Heap sizes for this network determined using Configuration.showHeapStats 52 # Heap sizes for this network determined using Configuration.showHeapStats
53 configuration.param_heap_size = (3 << 20) 53 configuration.param_heap_size = (3 << 20)
54 configuration.network_heap_size = (20 << 20) 54 configuration.network_heap_size = (34 << 20)
55 55
56 num_dsp = Executor.get_num_devices(DeviceType.DSP) 56 num_dsp = Executor.get_num_devices(DeviceType.DSP)
57 num_eve = Executor.get_num_devices(DeviceType.EVE) 57 num_eve = Executor.get_num_devices(DeviceType.EVE)
58 # AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
59 if num_eve > 2:
60 num_eve = 2
58 61
59 if num_dsp == 0 or num_eve == 0: 62 if num_dsp == 0 or num_eve == 0:
60 print('This example requires EVEs and DSPs.') 63 print('This example requires EVEs and DSPs.')
diff --git a/examples/ssd_multibox/main.cpp b/examples/ssd_multibox/main.cpp
index 93f4c89..eaa61bd 100644
--- a/examples/ssd_multibox/main.cpp
+++ b/examples/ssd_multibox/main.cpp
@@ -166,6 +166,9 @@ bool RunConfiguration(const cmdline_opts_t& opts)
166 c.enableApiTrace = opts.verbose; 166 c.enableApiTrace = opts.verbose;
167 if (opts.num_eves == 0 || opts.num_dsps == 0) 167 if (opts.num_eves == 0 || opts.num_dsps == 0)
168 c.runFullNet = true; 168 c.runFullNet = true;
169 // DSP only execution requires larger NETWORK HEAP size
170 if (opts.num_eves == 0)
171 c.NETWORK_HEAP_SIZE = 75000000;
169 172
170 // setup camera/video input 173 // setup camera/video input
171 VideoCapture cap; 174 VideoCapture cap;
diff --git a/examples/two_eo_per_frame/main.cpp b/examples/two_eo_per_frame/main.cpp
index f309d4e..d746edc 100644
--- a/examples/two_eo_per_frame/main.cpp
+++ b/examples/two_eo_per_frame/main.cpp
@@ -92,6 +92,8 @@ bool Run(int num_eve, int num_dsp, const char* ref_output)
92 // Heap sizes for this network determined using Configuration::showHeapStats 92 // Heap sizes for this network determined using Configuration::showHeapStats
93 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB 93 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB
94 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB 94 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB
95 // AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
96 if (num_eve > 2) num_eve = 2;
95 97
96 // Run this example for 16 input frames 98 // Run this example for 16 input frames
97 c.numFrames = 16; 99 c.numFrames = 16;
diff --git a/examples/two_eo_per_frame_opt/main.cpp b/examples/two_eo_per_frame_opt/main.cpp
index 68d9221..c54b908 100644
--- a/examples/two_eo_per_frame_opt/main.cpp
+++ b/examples/two_eo_per_frame_opt/main.cpp
@@ -97,6 +97,8 @@ bool Run(int num_eve, int num_dsp, const char* ref_output)
97 // Heap sizes for this network determined using Configuration::showHeapStats 97 // Heap sizes for this network determined using Configuration::showHeapStats
98 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB 98 c.PARAM_HEAP_SIZE = (3 << 20); // 3MB
99 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB 99 c.NETWORK_HEAP_SIZE = (34 << 20); // 34MB
100 // AM572x default CMEM size is 160MB, 4 EVEs + 2DSPs won't fit
101 if (num_eve > 2) num_eve = 2;
100 102
101 // Run this example for 16 input frames 103 // Run this example for 16 input frames
102 c.numFrames = 16; 104 c.numFrames = 16;