Skip to content

Commit df9420d

Browse files
committed
Fix macos compilation
1 parent c166e5f commit df9420d

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.github/workflows/causal_lm_cpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ jobs:
716716
source ./ov/setupvars.sh
717717
&& ./build/samples/cpp/visual_language_chat/visual_language_chat ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11
718718
<<< $'What is on the image?\nWhat is special on the image?'
719-
timeout-minutes: 300
719+
timeout-minutes: 110
720720
721721
cpp-continuous-batching-ubuntu:
722722
runs-on: ubuntu-20.04-8-cores

src/cpp/src/vision_encoder.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -236,39 +236,32 @@ ov::Tensor prepare_vis_position_ids(
236236
size_t max_im_h = pixel_values.get_shape().at(2), max_im_w = pixel_values.get_shape().at(3);
237237
size_t max_nb_patches_h = max_im_h / patch_size, max_nb_patches_w = max_im_w / patch_size;
238238
std::vector<float> boundaries(1.0f * num_patches_per_side - 1);
239-
OPENVINO_ASSERT(69 == boundaries.size());
240239
std::generate(boundaries.begin(), boundaries.end(), [num_patches_per_side, val = 0.0f]() mutable {
241240
val += 1.0f / num_patches_per_side;
242241
return val;
243242
});
244-
OPENVINO_ASSERT(2.0f / num_patches_per_side == boundaries.at(1));
245243
size_t position_ids_batch_elem = max_nb_patches_h * max_nb_patches_w;
246244
ov::Tensor position_ids{ov::element::i64, {batch_size, position_ids_batch_elem}};
247245
// throw std::runtime_error("");
248246
int64_t* res_data = position_ids.data<int64_t>();
249247
std::fill_n(res_data, position_ids.get_size(), 0);
250248

251249
for (size_t batch_idx = 0; batch_idx < batch_size; ++batch_idx) {
252-
auto [nb_patches_h, nb_patches_w] = tgt_sizes.at(batch_idx);
250+
size_t nb_patches_h = tgt_sizes.at(batch_idx).height;
251+
size_t nb_patches_w = tgt_sizes.at(batch_idx).widht;
253252

254253
std::vector<float> fractional_coords_h(nb_patches_h);
255-
OPENVINO_ASSERT(26 == fractional_coords_h.size());
256254
std::generate(fractional_coords_h.begin(), fractional_coords_h.end(), [nb_patches_h, val = -1.0f / nb_patches_h]() mutable {
257255
val += 1.0f / nb_patches_h;
258256
return val;
259257
});
260-
OPENVINO_ASSERT(0.5f == fractional_coords_h.at(13));
261258
std::vector<float> fractional_coords_w(nb_patches_w);
262-
OPENVINO_ASSERT(39 == fractional_coords_w.size());
263259
std::generate(fractional_coords_w.begin(), fractional_coords_w.end(), [nb_patches_w, val = -1.0f / nb_patches_w]() mutable {
264260
val += 1.0f / nb_patches_w;
265261
return val;
266262
});
267263

268264
std::vector<int64_t> bucket_coords_h = bucket_size_right(fractional_coords_h, boundaries);
269-
if(std::vector<int64_t>{0, 2, 5, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40, 43, 45, 48, 51, 53, 56, 59, 61, 64, 67} != bucket_coords_h) {
270-
OPENVINO_THROW("kek");
271-
}
272265
std::vector<int64_t> bucket_coords_w = bucket_size_right(fractional_coords_w, boundaries);
273266

274267
std::vector<int64_t> pos_ids(bucket_coords_h.size() * bucket_coords_w.size());

src/docs/BUILD.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ OpenVINO GenAI can be built as an extra module during the OpenVINO build process
4343
1. Clone OpenVINO and OpenVINO GenAI repositories:
4444
```sh
4545
git clone --recursive https://github.com/openvinotoolkit/openvino.git
46-
git clone --recursive https://github.com/openvinotoolkit/openvino_genai.git
46+
git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git
4747
```
4848
2. Configure CMake with OpenVINO extra modules:
4949
```sh
50-
cmake -DOPENVINO_EXTRA_MODULES=./openvino_genai -DCPACK_ARCHIVE_COMPONENT_INSTALL=OFF -S ./openvino -B ./build
50+
cmake -DOPENVINO_EXTRA_MODULES=./openvino.genai -DCPACK_ARCHIVE_COMPONENT_INSTALL=OFF -S ./openvino -B ./build
5151
```
5252
3. Build OpenVINO archive with GenAI:
5353
```sh

0 commit comments

Comments
 (0)