StanfordSNR / gg

The Stanford Builder
GNU General Public License v3.0
988 stars 71 forks source link

Update examples & Configure Docker #23

Closed ssnickolay closed 5 years ago

ssnickolay commented 5 years ago

The current plan:

Other examples will be updated in a separate PR

Closes #22

ssnickolay commented 5 years ago

Hi @sadjad ! Can you look this PR, please?

With @siedentop help, I added a Docker configuration that will help users easily run gg examples. Fibonacci and excamera examples were updated for the same purpose. Also llvm example was added as we discussed in issue. In general, I do not mind to update viddec and gtest examples too, but I can’t do it without your help, because I don’t quite understand how they work :(

viddec

As far a I understand, gen_vid_thunks25.cc it the same as ffmpeg_gg.py: gen_vid_thunks25 creates thunks via C++ SDK, ffmpeg_gg.py creates thunks via Python SDK. So I expect that *.out thunks should be equal. The gen_vid_thunks25 requires vid-chunk-hashes (and other values hashes). We can use gen_vid_thunks.py to generate .sh script that encapsulates hash calculation and calls gen_vid_thunks25 with correct params. The problems is that gen_vid_thunks.py requires all_vid.txt format of which unclear for me :( I have tried to use ffmpeg_gg.py to get *.out files (aka thunks) and actually I was successful: If change

# broken link
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz

# to
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz

in fetch-deps.sh, download deps and call ./ffmpeg_gg.py.

This generates ten .out files like:

# frameout00_lab.out
#!/usr/bin/env gg-force-and-run
TTI2qMUc3gMqYrSZgSfQj3I5CN5eAhgnrde7N1RowsBc0000020f

Unfortunately, when I try to run gg force, nothing happens:

gg

gtest

This is even hard for me that previous examples. gtest-create-thunks has a lot of options and I have no idea what I should pass for each 🤷‍♂

root@e5cffc05173d:/app/gg/examples/gtest# ./gtest-create-thunks
Usage: ./gtest-create-thunks
       [-w|--gtest-wrapper=<path>] [-d|--data-path=<path>]
       [-b|--gtest-binary=<path>] [-e|--envar=<string>]...
       ANNOTATION-FILE

I read the paper and I understand that every test should be annotated with the dependencies that it uses and this is probably all that I understand.

p/s Btw, we can merge this PR in the current state and continue working with other examples in separate branches. Up to you :)

ssnickolay commented 5 years ago

@sadjad friendly reminder ;)

sadjad commented 5 years ago

Hi @ssnickolay and @siedentop,

Great work! Thank you so much for doing this, and for the pull request. I just merged the changes with master.

For the video encoding example, let me first take a look (it's been a while!), and I will get back to you.

For gtest, the scripts and annotations for running LibVPX unit tests are here (the main file is test-gg-lambda.sh). Please let me know if there's anything I can help with here.

Again, thank you for your time, effort, and energy -- I really appreciate it!

Best, Sadjad