Skip to content

Commit

Permalink
.github/workflows/windows-ort.yml: add fp16 i/o tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 19, 2024
1 parent f439a9c commit fe1bbb9
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/windows-ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,39 @@ jobs:
shell: bash
run: |
set -ex
vs_portable/vspipe -i test.vpy -
vs_portable/vspipe -i test_fp16.vpy -
vs_portable/vspipe --y4m -p -e 9 test.vpy - | vs_portable/x265 --log-file x265.log --log-file-level info --y4m -D 10 --preset ultrafast -o out.hevc -
ls -l out.hevc x265.log
cat x265.log
grep -F 'encoded 10 frames' x265.log || exit 2
grep -i 'error' x265.log && exit 1
exit 0
- name: Create script (fp16 input)
shell: bash
run: echo "import vapoursynth as vs;from vapoursynth import core;import sys;print(core.ort, file=sys.stderr);flt=core.std.BlankClip(format=vs.RGBH).ort.Model(r\"waifu2x\\upconv_7_anime_style_art_rgb\\scale2.0x_model.onnx\", builtin=True, fp16=True);print(flt);flt.resize.Bicubic(format=vs.YUV420P10, matrix_s='709').set_output()" > test_fp16_input.vpy

- name: Run vspipe (fp16 input)
shell: bash
run: |
set -ex
vs_portable/vspipe -i test_fp16_input.vpy -
vs_portable/vspipe --y4m -p -e 9 test.vpy - | vs_portable/x265 --log-file x265.log --log-file-level info --y4m -D 10 --preset ultrafast -o out.hevc -
ls -l out.hevc x265.log
cat x265.log
grep -F 'encoded 10 frames' x265.log || exit 2
grep -i 'error' x265.log && exit 1
exit 0
- name: Create script (fp16 output)
shell: bash
run: echo "import vapoursynth as vs;from vapoursynth import core;import sys;print(core.ort, file=sys.stderr);flt=core.std.BlankClip(format=vs.RGBS).ort.Model(r\"waifu2x\\upconv_7_anime_style_art_rgb\\scale2.0x_model.onnx\", builtin=True, fp16=True, output_format=1);print(flt);flt.resize.Bicubic(format=vs.YUV420P10, matrix_s='709').set_output()" > test_fp16_output.vpy

- name: Run vspipe (fp16 input)
shell: bash
run: |
set -ex
vs_portable/vspipe -i test_fp16_output.vpy -
vs_portable/vspipe --y4m -p -e 9 test.vpy - | vs_portable/x265 --log-file x265.log --log-file-level info --y4m -D 10 --preset ultrafast -o out.hevc -
ls -l out.hevc x265.log
cat x265.log
Expand Down

0 comments on commit fe1bbb9

Please sign in to comment.