Skip to content

Commit c7098c8

Browse files
committed
Adding integration tests for pipelining
1 parent 4c145c9 commit c7098c8

File tree

7 files changed

+379
-6
lines changed

7 files changed

+379
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
curl -fsSL https://ollama.com/install.sh | sh
3939
ollama serve &
4040
sleep 5
41-
ollama pull llama3:8b
41+
ollama pull llama3.2:3b
4242
curl -s http://localhost:11434/api/tags || exit 1
4343
4444
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for

COPYRIGHT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright (c) 2025 Edge AI, LLC. All rights reserved.

framework/src/vx_graph.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Graph::Graph(vx_context context, vx_reference scope)
253253
#ifdef OPENVX_USE_STREAMING
254254
isStreamingEnabled(vx_false_e),
255255
isStreaming(vx_false_e),
256-
triggerNodeIndex(0),
256+
triggerNodeIndex(UINT32_MAX),
257257
streamingThread(),
258258
#endif /* OPENVX_USE_STREAMING */
259259
scheduleMode(VX_GRAPH_SCHEDULE_MODE_NORMAL)
@@ -1743,11 +1743,12 @@ void Graph::streamingLoop()
17431743
/* Wait for trigger node event if set */
17441744
// if (triggerNodeIndex != UINT32_MAX)
17451745
// {
1746+
// VX_PRINT(VX_ZONE_INFO, "Trigger node defined -- waiting on it to trigger\n");
17461747
// /* Wait for the trigger node to complete */
17471748
// while (!nodes[triggerNodeIndex]->executed)
17481749
// {
17491750
// std::cout << "Waiting for trigger node to complete" << std::endl;
1750-
// std::this_thread::sleep_for(std::chrono::milliseconds(1));
1751+
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
17511752
// /* Allow clean exit */
17521753
// if (!isStreaming) return;
17531754
// }
@@ -1999,7 +2000,7 @@ VX_API_ENTRY vx_status VX_API_CALL vxVerifyGraph(vx_graph graph)
19992000
VX_PRINT(VX_ZONE_ERROR, "Node " VX_FMT_REF " (%s) Parameter[%u] was required and not supplied!\n",
20002001
graph->nodes[n],
20012002
graph->nodes[n]->kernel->name,p);
2002-
status = VX_ERROR_NOT_SUFFICIENT;
2003+
status = VX_ERROR_INVALID_PARAMETERS;
20032004
num_errors++;
20042005
}
20052006
else if (graph->nodes[n]->parameters[p]->internal_count == 0)

framework/src/vx_graph_pipeline.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,11 @@ VX_API_ENTRY vx_status VX_API_CALL vxGraphParameterEnqueueReadyRef(vx_graph grap
178178
graph->parameters[i].queue.movePendingToReady();
179179
}
180180

181-
if (graph->scheduleMode == VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO)
181+
if (graph->scheduleMode == VX_GRAPH_SCHEDULE_MODE_QUEUE_AUTO
182+
#ifdef OPENVX_USE_STREAMING
183+
&& vx_false_e == graph->isStreaming
184+
#endif
185+
)
182186
{
183187
/* Schedule the graph */
184188
status = vxScheduleGraph(graph);

kernels/ai_server/chatbot.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <curl/curl.h>
1616
#include <nlohmann/json.hpp>
1717

18-
#define DEFAULT_MODEL "llama3:8b"
18+
#define DEFAULT_MODEL "llama3.2:3b"
1919
#define SERVER_URL "http://localhost:11434"
2020
#define API_KEY "hardcoded-api-key"
2121

tests/integration_test/BUILD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,35 @@ cc_test(
6565
size="small"
6666
)
6767

68+
cc_test(
69+
name="test_pipelining",
70+
srcs=[
71+
"test_pipelining.cpp"
72+
],
73+
deps=[
74+
"//:corevx",
75+
"@googletest//:gtest_main",
76+
"//targets/ai_server:imported_openvx_ai_server",
77+
"//targets/c_model:imported_openvx_c_model",
78+
"//targets/debug:imported_openvx_debug",
79+
"//targets/extras:imported_openvx_extras",
80+
"//targets/liteRT:imported_openvx_liteRT",
81+
"//targets/opencl:imported_openvx_opencl",
82+
"//targets/onnxRT:imported_openvx_onnxRT",
83+
"//targets/executorch:imported_openvx_torch",
84+
85+
],
86+
linkopts=select({
87+
"@platforms//os:linux": ["-Wl,-rpath,$ORIGIN"],
88+
"@platforms//os:macos": ["-Wl,-rpath,@executable_path"],
89+
"//conditions:default": [],
90+
}),
91+
data=[
92+
"//tests/raw:models",
93+
],
94+
size="small"
95+
)
96+
6897
cc_test(
6998
name = "test_tflite",
7099
srcs = [

0 commit comments

Comments
 (0)