From 57c407012faf9837773736cdc07c389575e22be0 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 1 Apr 2020 14:59:39 -0500 Subject: [PATCH 1/9] tidl: Makefile: copy "Remove usage of VPE in running TIDL examples" Signed-off-by: Robert Nelson --- BeagleBone/AI/tidl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeagleBone/AI/tidl/Makefile b/BeagleBone/AI/tidl/Makefile index 1a76e32..f56a373 100644 --- a/BeagleBone/AI/tidl/Makefile +++ b/BeagleBone/AI/tidl/Makefile @@ -4,7 +4,7 @@ include /var/lib/cloud9/common/Makefile run: ti-mct-heap-check -c - mjpg_streamer -i "input_opencv.so -r 640x480 --filter ./classification.tidl.so" -o "output_http.so -p 8090 -w /usr/share/mjpg-streamer/www" 2> /dev/null + sudo mjpg_streamer -i "input_opencv.so -r 640x480 -d /dev/$(shell fgrep -v vpe /sys/class/video4linux/video*/name | perl -ne '/\/(video\d+)\/name/ && print $$1') --filter ./classification.tidl.so" -o "output_http.so -p 8090 -w /usr/share/mjpg-streamer/www" 2> /dev/null clean: rm -f classification.tidl.so From 85014db4b853f1c0a7d914de139bffac4513504a Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 1 Apr 2020 14:58:38 -0500 Subject: [PATCH 2/9] tidl: Makefile: nuke /tmp/cloud9-examples/classification.tidl.so on clean Signed-off-by: Robert Nelson --- BeagleBone/AI/tidl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/BeagleBone/AI/tidl/Makefile b/BeagleBone/AI/tidl/Makefile index f56a373..7d7e186 100644 --- a/BeagleBone/AI/tidl/Makefile +++ b/BeagleBone/AI/tidl/Makefile @@ -8,4 +8,5 @@ run: clean: rm -f classification.tidl.so + rm -f /tmp/cloud9-examples/classification.tidl.so || true From aace8ea0112e71e32df5ab488d6ef07768489014 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 1 Apr 2020 15:25:33 +0000 Subject: [PATCH 3/9] Try using C++14 It should be a little less strict on what a constexpr literal is. --- common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Makefile b/common/Makefile index c1a0982..f238b7f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -129,7 +129,7 @@ define proc-to-build-vars = -lTIOpenCL -locl_util -lpthread CXX=g++ -c -o CXXFLAGS=-DCHIP=$(CHIP) -DMODEL=$(MODEL) -DPROC=$(PROC) -O3 -Wall -Werror -Wno-error=ignored-attributes \ - -I. -I$(TIDL_API_DIR)/inc -std=c++11 -I/usr/share/ti/opencl + -I. -I$(TIDL_API_DIR)/inc -std=c++14 -I/usr/share/ti/opencl else LD=gcc -o LDFLAGS=-lc -lm From 74b5ba9ef9d38fe5f92398d386b636edca484ae7 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 1 Apr 2020 15:43:41 +0000 Subject: [PATCH 4/9] AI/TIDL: try to cast return in constexpr to int --- BeagleBone/AI/tidl/classification.tidl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeagleBone/AI/tidl/classification.tidl.cpp b/BeagleBone/AI/tidl/classification.tidl.cpp index dc7ffc6..93a7a12 100644 --- a/BeagleBone/AI/tidl/classification.tidl.cpp +++ b/BeagleBone/AI/tidl/classification.tidl.cpp @@ -349,7 +349,7 @@ int tf_postprocess(uchar *in) int rpt_id = -1; typedef std::pair val_index; - auto constexpr cmp = [](val_index &left, val_index &right) { return left.first > right.first; }; + auto constexpr cmp = [](val_index &left, val_index &right) { return (int)(left.first > right.first); }; std::priority_queue, decltype(cmp)> queue(cmp); // initialize priority queue with smallest value on top for (int i = 0; i < k; i++) { From 89bf1eb130a307aba3ae0bc372c77447bffb66b6 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 1 Apr 2020 15:54:34 +0000 Subject: [PATCH 5/9] AI/TIDL: get rid of constexpr https://www.mail-archive.com/meta-arago@arago-project.org/msg10602.html --- BeagleBone/AI/tidl/classification.tidl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeagleBone/AI/tidl/classification.tidl.cpp b/BeagleBone/AI/tidl/classification.tidl.cpp index 93a7a12..b87d183 100644 --- a/BeagleBone/AI/tidl/classification.tidl.cpp +++ b/BeagleBone/AI/tidl/classification.tidl.cpp @@ -349,7 +349,7 @@ int tf_postprocess(uchar *in) int rpt_id = -1; typedef std::pair val_index; - auto constexpr cmp = [](val_index &left, val_index &right) { return (int)(left.first > right.first); }; + auto cmp = [](val_index &left, val_index &right) { return left.first > right.first; }; std::priority_queue, decltype(cmp)> queue(cmp); // initialize priority queue with smallest value on top for (int i = 0; i < k; i++) { From 2d6fb375a73d93549b0fd44e7924747b2d78639b Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 1 Apr 2020 14:57:19 -0500 Subject: [PATCH 6/9] common/Makefile: enable -fPIC for buster fixes: dlopen: ./classification.tidl.so: unexpected reloc type 0x03 Signed-off-by: Robert Nelson --- common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Makefile b/common/Makefile index f238b7f..06f0a9b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -128,7 +128,7 @@ define proc-to-build-vars = $(TIDL_API_DIR)/tidl_api.a $(TIDL_API_DIR)/tidl_imgutil.a \ -lTIOpenCL -locl_util -lpthread CXX=g++ -c -o - CXXFLAGS=-DCHIP=$(CHIP) -DMODEL=$(MODEL) -DPROC=$(PROC) -O3 -Wall -Werror -Wno-error=ignored-attributes \ + CXXFLAGS=-DCHIP=$(CHIP) -DMODEL=$(MODEL) -DPROC=$(PROC) -fPIC -O3 -Wall -Werror -Wno-error=ignored-attributes \ -I. -I$(TIDL_API_DIR)/inc -std=c++14 -I/usr/share/ti/opencl else LD=gcc -o From 72fbb9ff34de0e4597ceac1744be58770e7bf7d3 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 1 Apr 2020 15:12:33 +0000 Subject: [PATCH 7/9] AI/TIDL: list the correct projects available --- BeagleBone/AI/tidl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/BeagleBone/AI/tidl/Makefile b/BeagleBone/AI/tidl/Makefile index 7d7e186..b782832 100644 --- a/BeagleBone/AI/tidl/Makefile +++ b/BeagleBone/AI/tidl/Makefile @@ -7,6 +7,7 @@ run: sudo mjpg_streamer -i "input_opencv.so -r 640x480 -d /dev/$(shell fgrep -v vpe /sys/class/video4linux/video*/name | perl -ne '/\/(video\d+)\/name/ && print $$1') --filter ./classification.tidl.so" -o "output_http.so -p 8090 -w /usr/share/mjpg-streamer/www" 2> /dev/null clean: + rm -f dummy.tidl.so rm -f classification.tidl.so rm -f /tmp/cloud9-examples/classification.tidl.so || true From 45e1dcf7592975d1f8d73fa74a44fee4932e85d0 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 1 Apr 2020 15:10:04 +0000 Subject: [PATCH 8/9] AI/TIDL: list the correct projects available --- BeagleBone/AI/tidl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeagleBone/AI/tidl/Makefile b/BeagleBone/AI/tidl/Makefile index b782832..35fe257 100644 --- a/BeagleBone/AI/tidl/Makefile +++ b/BeagleBone/AI/tidl/Makefile @@ -1,4 +1,4 @@ -all: classification.tidl.so segmentation.tidl.so +all: dummy.tidl.so classification.tidl.so include /var/lib/cloud9/common/Makefile From beac14bbc9f1ac99b2e528460e27cb6f317a0f84 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Tue, 7 Apr 2020 13:11:13 -0400 Subject: [PATCH 9/9] Add branch status to README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index f49fd57..f6f5ccf 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,9 @@ common | PRU files that are common to all the Beag [extras](extras) | Lots of other demos. [PocketBeagle](PocketBeagle) | Demos for the smallest of Beagles. [sensorExamples](sensorExamples/README.md) | Examples for interfacing various sensors. Works on all Beagles + +# Status on different branches + +* master - on-going development, commits merged from unstable development branch +* v2020.01 - current stable, only bug fixes from unstable development branch +* v2020.08 - current unstable development branch, clean snapshot from 2020-04-06