Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added include dir to nlohmann headers #3

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ target_include_directories(${TARGET_NAME} PRIVATE
# fast_tokenizer
"${fast_tokenizer_SOURCE_DIR}/fast_tokenizer"
"${CMAKE_BINARY_DIR}/third_party/dart/src/extern_dart/include/"
"${CMAKE_BINARY_DIR}/third_party/json/src/extern_json/single_include/"
"${CMAKE_BINARY_DIR}/third_party/install/re2/include/")

if(CMAKE_CL_64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ void StringTensorUnpack::validate_and_infer_types() {
// - when string tensor is passed and we are after the hack in CPU (element::u8) and
// - when stirng tensor is not really used, and we expect a packed string tensor in this case (element::u8)

OPENVINO_ASSERT(
#if OPENVINO_ELEMENT_STRING_SUPPORTED
OPENVINO_ASSERT(
get_input_element_type(0) == element::string ||
get_input_element_type(0) == element::dynamic,
"Type of StringTensorUnpack input is expected to be element::string before a model compilation or element::u8 after the compilation or when element::string is not supported");
#endif
#if OPENVINO_USE_INPUT_OUTPUT_STRING_TENSOR_HACK || !USE_STRING_TENSORS
OPENVINO_ASSERT(
get_input_element_type(0) == element::u8 ||
#endif
get_input_element_type(0) == element::dynamic,
"Type of StringTensorUnpack input is expected to be element::string before a model compilation or element::u8 after the compilation or when element::string is not supported");
#endif

#if OPENVINO_ELEMENT_STRING_SUPPORTED
if(get_input_element_type(0) == element::string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ bool VocabDecoder::evaluate(ov::TensorVector& outputs, const ov::TensorVector& i
OPENVINO_ASSERT(inputs.size() == 4, "Too few inputs passed to VocabDecoder, it means it is not converted properly or it is not used in the supported pattern");

for(size_t id = 0; id < vocab_size; ++id) {
std::vector<uint8_t> token = std::vector(vocab_chars + vocab_begins[id], vocab_chars + vocab_ends[id]);
vocab[id] = token;
vocab[id] = std::vector<uint8_t>(vocab_chars + vocab_begins[id], vocab_chars + vocab_ends[id]);
}
// Set output shapes
outputs[0].set_shape({batch_size});
Expand Down