diff --git a/.github/workflows/causal_lm_cpp.yml b/.github/workflows/causal_lm_cpp.yml index af02065a96..6afbc11b27 100644 --- a/.github/workflows/causal_lm_cpp.yml +++ b/.github/workflows/causal_lm_cpp.yml @@ -9,8 +9,10 @@ on: - 'releases/**' permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions + concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + # github.ref is not unique in post-commit + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-causal-lm-cpp cancel-in-progress: true env: @@ -49,17 +51,20 @@ jobs: optimum-cli export openvino --trust-remote-code --weight-format fp16 --model openlm-research/open_llama_3b_v2 open_llama_3b_v2 - run: > . ./ov/setupvars.sh - && PYTHONPATH=./build/:$PYTHONPATH timeout 25s - ./build/samples/cpp/multinomial_causal_lm/multinomial_causal_lm ./open_llama_3b_v2/ a + && timeout 25s ./build/samples/cpp/multinomial_causal_lm/multinomial_causal_lm ./open_llama_3b_v2/ a + env: + PYTHONPATH: "./build" - run: > . ./ov/setupvars.sh - && PYTHONPATH=./build/:$PYTHONPATH timeout 25s - ./samples/python/multinomial_causal_lm/multinomial_causal_lm.py ./open_llama_3b_v2/ b + && timeout 25s ./samples/python/multinomial_causal_lm/multinomial_causal_lm.py ./open_llama_3b_v2/ b + env: + PYTHONPATH: "./build" - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 25s ./build/samples/cpp/greedy_causal_lm/greedy_causal_lm ./open_llama_3b_v2/ "return 0" | diff <(timeout 25s samples/python/greedy_causal_lm/greedy_causal_lm.py ./open_llama_3b_v2/ "return 0") - + env: + PYTHONPATH: "./build" cpp-beam_search_causal_lm-ubuntu: strategy: @@ -97,10 +102,10 @@ jobs: python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0 - name: Compare + env: + PYTHONPATH: "./build/" # C++ ignores that run: | source ./ov/setupvars.sh - export PYTHONPATH=./build/:$PYTHONPATH # C++ ignores that - timeout 25s ${{ matrix.executable }} ./TinyLlama-1.1B-Chat-v1.0/ "Why is the Sun yellow?" > ./pred.txt python -c " import transformers @@ -285,8 +290,9 @@ jobs: optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen-7B-Chat Qwen-7B-Chat - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 2m ./build/samples/cpp/greedy_causal_lm/greedy_causal_lm ./Qwen-7B-Chat/ 69 | diff <(timeout 2m samples/python/greedy_causal_lm/greedy_causal_lm.py ./Qwen-7B-Chat/ 69) - + env: + PYTHONPATH: "./build" cpp-beam_search_causal_lm-Qwen1_5-7B-Chat: runs-on: ubuntu-20.04-16-cores @@ -318,9 +324,10 @@ jobs: optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen1.5-7B-Chat Qwen1.5-7B-Chat - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 50s ./build/samples/cpp/beam_search_causal_lm/beam_search_causal_lm ./Qwen1.5-7B-Chat/ "你好!" | diff <(timeout 50s ./samples/python/beam_search_causal_lm/beam_search_causal_lm.py ./Qwen1.5-7B-Chat/ "你好!") - + env: + PYTHONPATH: "./build" cpp-beam_search_causal_lm-Phi-2: runs-on: ubuntu-20.04-16-cores @@ -352,9 +359,10 @@ jobs: optimum-cli export openvino --trust-remote-code --weight-format fp16 --model microsoft/phi-2 phi-2 - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 50s ./build/samples/cpp/beam_search_causal_lm/beam_search_causal_lm ./phi-2/ 69 | diff <(timeout 50s ./samples/python/beam_search_causal_lm/beam_search_causal_lm.py ./phi-2/ 69) - + env: + PYTHONPATH: "./build" cpp-beam_search_causal_lm-notus-7b-v1: runs-on: ubuntu-20.04-16-cores @@ -386,9 +394,10 @@ jobs: optimum-cli export openvino --trust-remote-code --weight-format fp16 --model argilla/notus-7b-v1 notus-7b-v1 - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 50s ./build/samples/cpp/beam_search_causal_lm/beam_search_causal_lm ./notus-7b-v1/ 69 | diff <(timeout 50s ./samples/python/beam_search_causal_lm/beam_search_causal_lm.py ./notus-7b-v1/ 69) - + env: + PYTHONPATH: "./build" cpp-speculative_decoding_lm-ubuntu: runs-on: ubuntu-20.04-16-cores @@ -503,7 +512,6 @@ jobs: ./build/samples/cpp/prompt_lookup_decoding_lm/prompt_lookup_decoding_lm ./Qwen-7B-Chat/ "$( predictions_prompt_lookup.txt ./build/samples/cpp/greedy_causal_lm/greedy_causal_lm ./Qwen-7B-Chat/ "$( predictions_greedy.txt - python -c " with open('predictions_greedy.txt', 'r') as f: predicted_greedy = f.readline() @@ -563,9 +571,10 @@ jobs: echo Phi-1_5 passed - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 50s samples/python/greedy_causal_lm/greedy_causal_lm.py ./phi-1_5/ "Alan Turing was a" | diff ./pred_greedy.txt - + env: + PYTHONPATH: "./build" cpp-greedy_causal_lm-redpajama-3b-chat: runs-on: ubuntu-20.04-4-cores @@ -617,9 +626,10 @@ jobs: echo "Alan Turing was a" passed - run: > . ./ov/setupvars.sh - && export PYTHONPATH=./build/:$PYTHONPATH && timeout 50s samples/python/greedy_causal_lm/greedy_causal_lm.py ./redpajama-3b-chat/ "Alan Turing was a" | diff ./pred_greedy.txt - + env: + PYTHONPATH: "./build" cpp-chat_sample-ubuntu: runs-on: ubuntu-24.04 @@ -650,6 +660,8 @@ jobs: python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0 - name: Compare + env: + PYTHONPATH: "./build" run: | source ./ov/setupvars.sh printf 'What is 2 + 2?\nWhat is the previous answer?\nAdd 1 to it.\nSubtract 5 from it.\nWhy is the sun yellow?\nWhat was my first question?\n' > ./input.txt @@ -682,11 +694,11 @@ jobs: " diff pred.txt ref.txt echo "Chat sample cpp" passed - export PYTHONPATH=./build/:$PYTHONPATH timeout 30s ./samples/python/chat_sample/chat_sample.py ./TinyLlama-1.1B-Chat-v1.0/ < input.txt > ./pred2.txt diff pred2.txt ref.txt echo "Chat sample python" passed + visual_language_chat_sample-ubuntu: runs-on: ubuntu-22.04-16-cores steps: @@ -757,9 +769,10 @@ jobs: - name: Run visual_language_chat Python sample - MiniCPM-V-2_6 run: > source ./ov/setupvars.sh - && PYTHONPATH=./build/:$PYTHONPATH - ./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ ./images/ + && ./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ ./images/ <<< $'Describe the images?' | tee py.txt + env: + PYTHONPATH: "./build/" - run: diff py.txt ref.txt - name: Run visual_language_chat C++ sample with 2 prompts - MiniCPM-V-2_6 run: > @@ -770,9 +783,10 @@ jobs: - name: Run visual_language_chat Python sample with 2 prompts - MiniCPM-V-2_6 run: > source ./ov/setupvars.sh - && PYTHONPATH=./build/:$PYTHONPATH - ./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ ./cat.jpg + && ./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ ./cat.jpg <<< $'What is unusual on this image?\nGo on.' | tee py2.txt + env: + PYTHONPATH: "./build/" - run: diff cpp2.txt py2.txt - name: Download and convert LLaVa 1.5 model and an image run: | @@ -797,6 +811,7 @@ jobs: <<< $'Who drew this painting?\nWhen did the painter live?' timeout-minutes: 4 + cpp-continuous-batching-ubuntu: runs-on: ubuntu-20.04-8-cores defaults: diff --git a/.github/workflows/lcm_dreamshaper_cpp.yml b/.github/workflows/lcm_dreamshaper_cpp.yml index d5f48afbeb..f22722c19e 100644 --- a/.github/workflows/lcm_dreamshaper_cpp.yml +++ b/.github/workflows/lcm_dreamshaper_cpp.yml @@ -11,16 +11,17 @@ on: permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions +concurrency: + # github.ref is not unique in post-commit + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-lcm-dreamshaper-cpp + cancel-in-progress: true + env: PYTHON_VERSION: '3.9' LINUX_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-17053-939b35a9629/l_openvino_toolkit_ubuntu22_2024.5.0.dev20241018_x86_64.tgz WINDOWS_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-17053-939b35a9629/w_openvino_toolkit_windows_2024.5.0.dev20241018_x86_64.zip OV_INSTALL_DIR: ${{ github.workspace }}/ov -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: lcm_dreamshaper_v7_cpp-linux: runs-on: ubuntu-22.04 @@ -78,7 +79,6 @@ jobs: python ./samples/python/text2image/main.py ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" env: PYTHONPATH: ${{ env.build_dir }} - LD_LIBRARY_PATH: ${{ env.build_dir }}/openvino_genai lcm_dreamshaper_v7_cpp-windows: runs-on: windows-2019 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1c92da8a2a..8881c70ccb 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -8,6 +8,8 @@ on: - master - 'releases/**' +permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions + concurrency: # github.ref is not unique in post-commit group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux @@ -18,8 +20,6 @@ env: OV_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }} OV_TARBALL: '' -permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions - jobs: openvino_download: name: Download OpenVINO package diff --git a/.github/workflows/llm_bench-python.yml b/.github/workflows/llm_bench-python.yml index 1eca051ad6..d7fab9f360 100644 --- a/.github/workflows/llm_bench-python.yml +++ b/.github/workflows/llm_bench-python.yml @@ -3,10 +3,6 @@ name: llm_bench Python Test -env: - LLM_BENCH_PYPATH: tools/llm_bench - WWB_PATH: tools/who_what_benchmark - on: push: branches: [ "master" ] @@ -21,6 +17,15 @@ on: permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions +concurrency: + # github.ref is not unique in post-commit + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-llm-bench-python + cancel-in-progress: true + +env: + LLM_BENCH_PYPATH: tools/llm_bench + WWB_PATH: tools/who_what_benchmark + jobs: build: runs-on: ubuntu-latest @@ -57,9 +62,10 @@ jobs: path: llm.bench_diff.diff - name: Test native pytorch model on Linux run: | - export GIT_LFS_SKIP_SMUDGE=0 git clone --depth 1 https://huggingface.co/katuni4ka/tiny-random-qwen python ./tools/llm_bench/benchmark.py -m tiny-random-qwen -d cpu -n 1 -f pt + env: + GIT_LFS_SKIP_SMUDGE: 0 - name: Test tiny-random-baichuan2 on Linux run: | optimum-cli export openvino --model katuni4ka/tiny-random-baichuan2 --trust-remote-code --weight-format fp16 ./ov_models/tiny-random-baichuan2/pytorch/dldt/FP16 diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e24446ac10..a2a74386d1 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -8,6 +8,8 @@ on: - master - 'releases/**' +permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions + concurrency: # github.ref is not unique in post-commit group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-mac @@ -18,8 +20,6 @@ env: OV_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }} OV_TARBALL: '' -permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions - jobs: openvino_download: name: Download OpenVINO package diff --git a/.github/workflows/stable_diffusion_1_5_cpp.yml b/.github/workflows/stable_diffusion_1_5_cpp.yml index 7c0d0e4152..40cda2cc19 100644 --- a/.github/workflows/stable_diffusion_1_5_cpp.yml +++ b/.github/workflows/stable_diffusion_1_5_cpp.yml @@ -11,16 +11,17 @@ on: permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions +concurrency: + # github.ref is not unique in post-commit + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-stable-diffusion-1-5-cpp + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' LINUX_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-17053-939b35a9629/l_openvino_toolkit_ubuntu20_2024.5.0.dev20241018_x86_64.tgz WINDOWS_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-17053-939b35a9629/w_openvino_toolkit_windows_2024.5.0.dev20241018_x86_64.zip OV_INSTALL_DIR: ${{ github.workspace }}/ov -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: stable_diffusion_1_5_cpp-linux: runs-on: ubuntu-20.04-8-cores @@ -84,7 +85,6 @@ jobs: python ./samples/python/text2image/main.py ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" env: PYTHONPATH: ${{ env.build_dir }} - LD_LIBRARY_PATH: ${{ env.build_dir }}/openvino_genai - name: Run Python LoRA app run: | @@ -93,7 +93,6 @@ jobs: python ./samples/python/text2image/lora.py ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "curly-haired unicorn in the forest, anime, line" ./models/soulcard.safetensors 0.7 env: PYTHONPATH: ${{ env.build_dir }} - LD_LIBRARY_PATH: ${{ env.build_dir }}/openvino_genai stable_diffusion_1_5_cpp-windows: runs-on: windows-2019 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 663a538295..43692dcf6f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,6 +8,8 @@ on: - master - 'releases/**' +permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions + concurrency: # github.ref is not unique in post-commit group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows @@ -18,8 +20,6 @@ env: OV_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }} OV_TARBALL: '' -permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions - jobs: openvino_download: name: Download OpenVINO package