Skip to content

Commit 5709906

Browse files
committed
Add readme for chapel-webcam. Demo works with optimized flags.
1 parent b057c16 commit 5709906

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

demos/video/chapel-webcam/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ OPENCV_LDFLAGS := $(shell pkg-config --cflags --libs opencv4)
6565

6666
main: main.cpp smol_wrapper.h lib/libsmol.so
6767
@echo $(OPENCV_CFLAGS)
68-
$(CHPL_LINKER) $(CHPL_CFLAGS) $(OPENCV_CFLAGS) $(BRIDGE_CFLAGS) -std=c++20 -fPIC main.cpp -o main $(CHPL_LDFLAGS) $(OPENCV_LDFLAGS) $(BRIDGE_LDFLAGS)
68+
$(CHPL_LINKER) $(CHPL_CFLAGS) $(OPENCV_CFLAGS) $(BRIDGE_CFLAGS) -O2 -std=c++20 -fPIC main.cpp -o main $(CHPL_LDFLAGS) $(OPENCV_LDFLAGS) $(BRIDGE_LDFLAGS)
6969

7070
clean:
7171
rm -f maincpp maincpp.o main.o main

demos/video/chapel-webcam/model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"model.eval()\n",
3232
"\n",
3333
"sm = torch.jit.script(model.to(torch.float32))\n",
34-
"sm.save(f\"model.pt\")\n"
34+
"# sm.save(f\"model.pt\")\n"
3535
]
3636
},
3737
{
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
3+
```
4+
cd ChAI/build
5+
make bridge_objs
6+
cd demos/video/chapel-webcam
7+
make cleanall && make clean && make libsmol && make main
8+
./main --modelPath sobel.pt
9+
```

0 commit comments

Comments
 (0)