Skip to content

Commit 0ea2656

Browse files
committed
source ./ov/setupvars.sh
1 parent ddb1c29 commit 0ea2656

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/causal_lm_cpp.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -701,26 +701,22 @@ jobs:
701701
run: >
702702
curl ${{ env.m_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
703703
&& brew install coreutils scons
704-
- run: >
705-
OpenVINO_DIR=./ov/runtime/cmake/
706-
TBB_DIR=./ov/runtime/3rdparty/tbb/lib/cmake
707-
cmake -DCMAKE_BUILD_TYPE=Release -B ./build/ ./
704+
- run: OpenVINO_DIR=./ov/runtime/cmake/ cmake -DCMAKE_BUILD_TYPE=Release -B ./build/ ./
708705
- run: >
709706
LD_LIBRARY_PATH=${{ github.workspace }}/ov/runtime/3rdparty/tbb/lib/:$LD_LIBRARY_PATH
710707
cmake --build ./build/ --config Release --target visual_language_chat -j
711-
- run: >
712-
LD_LIBRARY_PATH=${{ github.workspace }}/ov/runtime/3rdparty/tbb/lib/:$LD_LIBRARY_PATH
713-
DYLD_LIBRARY_PATH=${{ github.workspace }}/ov/runtime/3rdparty/tbb/lib/:$DYLD_LIBRARY_PATH
714-
./build/samples/cpp/visual_language_chat/visual_language_chat ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11
715-
<<< $'What is on the image?\nWhat is special on the image?'
716-
timeout-minutes: 2
717708
- run: >
718709
source ./ov/setupvars.sh
719710
&& python -m pip install --upgrade-strategy eager ./thirdparty/openvino_tokenizers/[transformers] -r ./samples/requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
720711
- run: >
721712
source ./ov/setupvars.sh
722713
&& python ./samples/cpp/visual_language_chat/export_MiniCPM-V-2_6.py ./miniCPM-V-2_6/
723714
- run: wget https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11
715+
- run: >
716+
source ./ov/setupvars.sh
717+
&& ./build/samples/cpp/visual_language_chat/visual_language_chat ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11
718+
<<< $'What is on the image?\nWhat is special on the image?'
719+
timeout-minutes: 2
724720
725721
cpp-continuous-batching-ubuntu:
726722
runs-on: ubuntu-20.04-8-cores

samples/cpp/visual_language_chat/load_image.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ov::Tensor utils::load_image(const std::filesystem::path& image_path) {
1313
image_path.string().c_str(),
1414
&x, &y, &channels_in_file, desired_channels);
1515
if (!image) {
16-
throw std::runtime_error{"Failed to load the image"};
16+
throw std::runtime_error{"Failed to load the image."};
1717
}
1818
struct SharedImageAllocator {
1919
unsigned char* image;
@@ -22,11 +22,11 @@ ov::Tensor utils::load_image(const std::filesystem::path& image_path) {
2222
if (channels * height * width == bytes) {
2323
return image;
2424
}
25-
throw std::runtime_error{"Unexpected number of bytes was requested to allocate"};
25+
throw std::runtime_error{"Unexpected number of bytes was requested to allocate."};
2626
}
2727
void deallocate(void*, size_t bytes, size_t) {
2828
if (channels * height * width != bytes) {
29-
throw std::runtime_error{"Unexpected number of bytes was requested to deallocate"};
29+
throw std::runtime_error{"Unexpected number of bytes was requested to deallocate."};
3030
}
3131
std::free(image);
3232
image = nullptr;

0 commit comments

Comments
 (0)