Skip to content

Commit 41a720b

Browse files
v5.2.0 (#36)
v5.2.0
1 parent 1adb330 commit 41a720b

209 files changed

Lines changed: 4517 additions & 2657 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if(WIN32)
3535
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS}
3636
/W4
3737
/DWIN32_LEAN_AND_MEAN
38-
/DNOMINMAX # NOMINMAX is required in order to play nice with std::min/std::max (otherwise Windows.h defines it's own)
38+
/DNOMINMAX # NOMINMAX is required in order to avoid conflicts with std::min/std::max (otherwise Windows.h defines it's own)
3939
/D_HAILO_EXPORTING
4040
/wd4201 # Anonymous union/struct
4141
/wd4251 # C++ ABI with STL

common/include/d2h_events.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ typedef enum {
6565

6666
/* SCMI Event IDs */
6767
NN_CORE_CRC_ERROR_EVENT_ID,
68+
THROTTLING_STATE_CHANGE_EVENT_ID,
6869

6970
D2H_EVENT_ID_COUNT /* Must be last*/
7071
} D2H_EVENT_ID_t;
@@ -161,6 +162,12 @@ typedef struct {
161162

162163
#define D2H_EVENT_CONTEXT_SWITCH_RUN_TIME_ERROR_EVENT_PARAMETER_COUNT (5)
163164

165+
typedef struct {
166+
uint16_t throttling_state;
167+
} D2H_EVENT_throttling_state_change_message_t;
168+
169+
#define D2H_EVENT_THROTTLING_STATE_CHANGE_PARAMETER_COUNT (1)
170+
164171
/* D2H_EVENT__message_parameters_t should be in the same order as hailo_notification_message_parameters_t */
165172
typedef union {
166173
D2H_EVENT_rx_error_event_message_t rx_error_event;
@@ -174,6 +181,7 @@ typedef union {
174181
D2H_EVENT_health_monitor_clock_changed_event_message_t health_monitor_clock_changed_event;
175182
D2H_EVENT_hw_infer_mamager_infer_done_message_t hw_infer_manager_infer_done_event;
176183
D2H_EVENT_context_switch_run_time_error_event_message_t context_switch_run_time_error_event;
184+
D2H_EVENT_throttling_state_change_message_t throttling_state_change;
177185
} D2H_EVENT__message_parameters_t;
178186

179187
typedef struct {

hailort/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ endif()
3333

3434
# Set firmware version
3535
add_definitions( -DFIRMWARE_VERSION_MAJOR=5 )
36-
add_definitions( -DFIRMWARE_VERSION_MINOR=1 )
37-
add_definitions( -DFIRMWARE_VERSION_REVISION=1 )
36+
add_definitions( -DFIRMWARE_VERSION_MINOR=2 )
37+
add_definitions( -DFIRMWARE_VERSION_REVISION=0 )
3838

3939
# TODO: temporary hack to support offline builds. Remove HAILO_OFFLINE_COMPILATION and use FETCHCONTENT_FULLY_DISCONNECTED
4040
if(HAILO_OFFLINE_COMPILATION)

hailort/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019-2025 Hailo Technologies Ltd.
3+
Copyright (c) 2019-2026 Hailo Technologies Ltd.
44
All rights reserved.
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of

hailort/LICENSE-3RD-PARTY.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
| Package | Copyright (c) | License | Version | Notes | References |
2-
|:---------------------------------|:----------------------------------|:-----------------------------------|:----------------------|:-----------------------------------------------------|:------------------------------------------------------------------------------|
3-
| CLI11 | University of Cincinnati | 3-Clause BSD | 2.2.0 | Fork | https://github.com/hailo-ai/CLI11 |
4-
| Catch2 | Catch2 Authors | BSL-1.0 | 2.13.7 | Cloned entire package | https://github.com/catchorg/Catch2 |
5-
| protobuf | Google Inc. | BSD | 21.12 | Cloned entire package | https://github.com/protocolbuffers/protobuf |
6-
| pybind11 | Wenzel Jakob | BSD | 2.13.6 | Cloned entire package | https://github.com/pybind/pybind11 |
7-
| spdlog | Gabi Melman | MIT | 1.14.1 | Cloned entire package | https://github.com/gabime/spdlog |
8-
| folly | Facebook, Inc. and its affiliates | Apache License 2.0 | v2020.08.17.00 | Copied only the file `folly/TokenBucket.h` | https://github.com/facebook/folly |
9-
| nlohmann_json | nlohmann | MIT License | v3.11.3 | Cloned entire package | https://github.com/nlohmann/json |
10-
| readerwriterqueue | Cameron Desrochers | Simplified BSD | 1.0.3 | Cloned entire package | https://github.com/cameron314/readerwriterqueue |
11-
| DotWriter | John Vilk | MIT License | master | Fork | https://github.com/hailo-ai/DotWriter |
12-
| benchmark | Google Inc. | Apache License 2.0 | 1.6.0 | Cloned entire package | https://github.com/google/benchmark.git |
13-
| md5 | Alexander Peslyak | cut-down BSD | - | Copied code from website | http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 |
14-
| pevents | Mahmoud Al-Qudsi | MIT License | master | Cloned entire package | https://github.com/neosmart/pevents.git |
15-
| stb | Sean Barrett | MIT License | 0.97 | Copied only the file `stb/stb_image_resize.h` | https://github.com/nothings/stb |
16-
| eigen | | Mozilla Public License 2.0 | 3.4.0 | Cloned entire package | https://gitlab.com/libeigen/eigen |
17-
| cpp-httplib | | MIT License | v0.18.2 | Cloned entire package | https://github.com/yhirose/cpp-httplib.git |
18-
| xxHash | Yann Collet | 2-Clause BSD | 0.8.2 | Cloned entire package, used as a header-only lib | https://github.com/Cyan4973/xxHash |
19-
| tokenizers_cpp | mlc-ai | Apache License 2.0 | main | Cloned entire package | https://github.com/mlc-ai/tokenizers-cpp.git |
20-
| minja | Google LLC | MIT License | main | Cloned entire package, used as a header-only lib | https://github.com/google/minja |
21-
| LibrosaCpp | ewan xu | Apache License 2.0 | main | Copied only the file `librosa.h`, and modified it | https://github.com/ewan-xu/LibrosaCpp |
1+
| Package | Copyright (c) | License | Version | Notes |Usage |References |
2+
|:---------------------------------|:----------------------------------|:-----------------------------------|:----------------------|:-----------------------------------------------------|---------------------|:------------------------------------------------------------------------------|
3+
| CLI11 | University of Cincinnati | 3-Clause BSD | 2.2.0 | Fork (modified) |Header only | https://github.com/hailo-ai/CLI11 |
4+
| Catch2 | Catch2 Authors | BSL-1.0 | 2.13.7 | Cloned entire package |Header only | https://github.com/catchorg/Catch2 |
5+
| protobuf | Google Inc. | BSD | 21.12 | Cloned entire package |Staticly linked | https://github.com/protocolbuffers/protobuf |
6+
| pybind11 | Wenzel Jakob | BSD | 2.13.6 | Cloned entire package |Header only | https://github.com/pybind/pybind11 |
7+
| spdlog | Gabi Melman | MIT | 1.14.1 | Cloned entire package |Staticly linked | https://github.com/gabime/spdlog |
8+
| folly | Facebook, Inc. and its affiliates | Apache License 2.0 | v2020.08.17.00 | Copied only the file `folly/TokenBucket.h` |Combined source code | https://github.com/facebook/folly |
9+
| nlohmann_json | nlohmann | MIT License | v3.11.3 | Cloned entire package |Header only | https://github.com/nlohmann/json |
10+
| readerwriterqueue | Cameron Desrochers | Simplified BSD | 1.0.3 | Cloned entire package |Header only | https://github.com/cameron314/readerwriterqueue |
11+
| DotWriter | John Vilk | MIT License | master | Fork (modified) |Staticly linked | https://github.com/hailo-ai/DotWriter |
12+
| benchmark | Google Inc. | Apache License 2.0 | 1.6.0 | Cloned entire package |Staticly linked | https://github.com/google/benchmark.git |
13+
| md5 | Alexander Peslyak | cut-down BSD | - | Copied code from website |Combined source code | http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 |
14+
| pevents | Mahmoud Al-Qudsi | MIT License | master | Cloned entire package |Staticly linked | https://github.com/neosmart/pevents.git |
15+
| stb | Sean Barrett | MIT License | 0.97 | Copied only the file `stb/stb_image_resize.h` |Combined source code | https://github.com/nothings/stb |
16+
| eigen | | Mozilla Public License 2.0 | 3.4.0 | Cloned entire package |Header only | https://gitlab.com/libeigen/eigen |
17+
| cpp-httplib | | MIT License | v0.18.2 | Cloned entire package |Header only | https://github.com/yhirose/cpp-httplib.git |
18+
| xxHash | Yann Collet | 2-Clause BSD | 0.8.2 | Cloned entire package |Header only | https://github.com/Cyan4973/xxHash |
19+
| tokenizers_cpp | mlc-ai | Apache License 2.0 | main | Cloned entire package |Staticly linked | https://github.com/mlc-ai/tokenizers-cpp.git |
20+
| minja | Google LLC | MIT License | main | Cloned entire package |Header only | https://github.com/google/minja |
21+
| LibrosaCpp | ewan xu | Apache License 2.0 | main | Copied only the file `librosa.h` (modified) |Combined source code | https://github.com/ewan-xu/LibrosaCpp |

hailort/common/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include(${HAILO_EXTERNALS_CMAKE_SCRIPTS}/xxhash.cmake)
66
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/common_compiler_options.cmake)
77
include(${HAILO_EXTERNALS_CMAKE_SCRIPTS}/protobuf.cmake) # Required for genai serializer
88

9-
109
set(HAILORT_COMMON_CPP_SOURCES
1110
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp
1211
${CMAKE_CURRENT_SOURCE_DIR}/barrier.cpp

hailort/common/genai/constants.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ namespace hailort
1717
namespace genai
1818
{
1919

20+
static const std::string HEADER_PROTO_PADDING = "header+proto+padding";
21+
static const std::string CCWS = "CCWs";
22+
2023
// Common resource names for GenAI components
2124
static const std::string INPUT_EMB_BINARY = "embeddings.bin";
2225
static const std::string TOKENIZER = "tokenizer.json";
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@
2626
#pragma warning(pop)
2727
#else
2828
#pragma GCC diagnostic pop
29-
#endif
29+
#endif
30+

hailort/common/genai/serializer/genai_scheme.proto

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,19 @@ message GenAIRpcReply {
7070
}
7171
}
7272

73+
message HefChunkInfo {
74+
string name = 1;
75+
uint64 size = 2;
76+
uint64 offset = 3;
77+
}
78+
7379
message LLM_Create_Request {
7480
string lora_name = 1;
7581
string hef_path = 2;
7682
string group_id = 3;
77-
uint64 file_size = 4;
83+
repeated HefChunkInfo chunks_to_transfer = 4;
7884
bool tokenizer_on_host = 5;
85+
uint64 total_hef_size = 6;
7986
}
8087

8188
message LLM_Create_Reply {
@@ -127,11 +134,16 @@ message LLM_Generator_Generate_Reply {
127134
repeated uint32 initial_prefix_tokens = 2; // Initial prefix tokens to use for this generation session
128135
}
129136

137+
message Embedding {
138+
uint32 type = 1;
139+
bytes data = 2;
140+
}
141+
130142
message TextGenerationInput {
131-
string initial_prompt = 1; // Client-side tokenizer: empty | Server-side tokenizer: valid on first iter
132-
repeated uint32 tokens = 2; // * first iter - Client-side tokenizer: combined prefix+input tokens | Server-side tokenizer: prefix tokens_history_before_reasoning
133-
// * Subsequent iters - single token
134-
repeated bytes embeddings = 3; // Client-side tokenizer: valid | Server-side tokenizer: empty
143+
string initial_prompt = 1; // Client-side tokenizer: empty | Server-side tokenizer: valid on first iter
144+
repeated uint32 tokens = 2; // * first iter - Client-side tokenizer: combined prefix+input tokens | Server-side tokenizer: prefix tokens_history_before_reasoning
145+
// * Subsequent iters - single token
146+
repeated Embedding embeddings = 3; // Client-side tokenizer: valid | Server-side tokenizer: empty
135147
}
136148

137149
message TextGenerationOutput {
@@ -261,8 +273,9 @@ message LLM_Get_Max_Context_Capacity_Reply {
261273
message VLM_Create_Request {
262274
string group_id = 1;
263275
string hef_path = 2; // non-empty means hef exists on server side
264-
uint64 file_size = 3;
276+
repeated HefChunkInfo chunks_to_transfer = 3;
265277
bool tokenizer_on_host = 4;
278+
uint64 total_hef_size = 5;
266279
}
267280

268281
message FrameFormat {
@@ -283,11 +296,13 @@ message VLM_Create_Reply {
283296
string prompt_template = 4;
284297
uint32 embedding_features = 5;
285298
uint32 image_pad_token_id = 6;
286-
uint32 embeddings_per_frame = 7;
299+
uint32 video_pad_token_id = 7;
300+
uint32 embeddings_per_frame = 8;
287301
}
288302

289303
message VLM_Generator_Generate_Request {
290-
uint32 number_of_frames = 1;
304+
uint32 number_of_frames = 1; // Standalone frames
305+
repeated uint32 video_frames_count_per_video = 3; // Holds a frame-count for each given video
291306
}
292307

293308
message VLM_Generator_Generate_Reply {
@@ -310,11 +325,17 @@ message Speech2Text_Create_Request {
310325

311326
message Speech2Text_Create_Reply {
312327
uint32 status = 1;
328+
Speech2TextGeneratorParams generator_params = 2;
313329
}
314330

315-
message Speech2Text_Generate_Request {
331+
message Speech2TextGeneratorParams {
316332
uint32 task_type = 1;
317333
string language = 2;
334+
float repetition_penalty = 3;
335+
}
336+
337+
message Speech2Text_Generate_Request {
338+
Speech2TextGeneratorParams generator_params = 1;
318339
// The next message to the server is the audio chunk
319340
}
320341

0 commit comments

Comments
 (0)