Skip to content

Commit

Permalink
Fixed errors during Android build (openvinotoolkit#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Aug 30, 2024
1 parent 6ceb16d commit d98f727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ragged_to_ragged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool RaggedToRagged::evaluate(ov::TensorVector& outputs, const ov::TensorVector&
auto rowids_size = static_cast<int32_t>(inputs[0].get_size());
auto first_dim_size = inputs[1].data<const int32_t>();

const uint64_t batch_size = static_cast<uint64_t>(first_dim_size[0]);
const size_t batch_size = static_cast<size_t>(first_dim_size[0]);
outputs[0].set_shape(ov::Shape{ batch_size });
outputs[1].set_shape(ov::Shape{ batch_size });

Expand All @@ -41,7 +41,7 @@ bool RaggedToRagged::evaluate(ov::TensorVector& outputs, const ov::TensorVector&
// prev_row_id stores row id for previous row
int32_t prev_row_id = -1;
for (int32_t rowids_idx = 0; rowids_idx < rowids_size; ++rowids_idx) {
int32_t curr_row_id = rowids[rowids_idx];
uint32_t curr_row_id = rowids[rowids_idx];
OPENVINO_ASSERT(0 <= curr_row_id, "row id must be non-negative");
if (curr_row_id >= batch_size) {
break;
Expand Down
2 changes: 1 addition & 1 deletion src/ragged_to_sparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool RaggedToSparse::evaluate(ov::TensorVector& outputs, const ov::TensorVector&
auto ends = inputs[1].data<const int32_t>();

const auto last_element_index = inputs[1].get_size() - 1;
const uint64_t num_elements = static_cast<uint64_t>(ends[last_element_index] - begins[0]);
const size_t num_elements = static_cast<size_t>(ends[last_element_index] - begins[0]);
outputs[0].set_shape(ov::Shape{num_elements, 2});

auto batch_size = inputs[0].get_size();
Expand Down

0 comments on commit d98f727

Please sign in to comment.