1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
--- a/CMakeLists.txt 2022-06-13 21:42:28.197087591 +0200
+++ b/CMakeLists.txt 2022-06-13 21:44:49.787170054 +0200
@@ -77,6 +77,7 @@
OUTPUT_NAME "foxi"
POSITION_INDEPENDENT_CODE YES)
target_link_libraries(foxi_wrapper PRIVATE foxi_loader foxi)
+ target_link_options(foxi_wrapper PUBLIC "-Wl,-soname=libfoxi.so")
if(DEFINED FOXI_SEARCH_DIR)
target_compile_definitions(foxi_wrapper PRIVATE "FOXI_SEARCH_DIR=\"${FOXI_SEARCH_DIR}\"")
endif()
@@ -115,11 +116,11 @@
install(TARGETS
foxi foxi_dummy foxi_loader
- EXPORT ONNXTargets DESTINATION lib)
+ EXPORT ONNXTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT ANDROID AND NOT IOS)
install(TARGETS foxi_wrapper
- EXPORT ONNXTargets DESTINATION lib)
+ EXPORT ONNXTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set(FOXI_INCLUDE_DIRS "${FOXI_ROOT}" "${CMAKE_CURRENT_BINARY_DIR}")
--- a/foxi/onnxifi_wrapper.c 2022-06-14 08:07:07.351585673 +0200
+++ b/foxi/onnxifi_wrapper.c 2022-06-14 08:11:21.680855591 +0200
@@ -761,7 +761,9 @@
const void* onnxModel,
uint32_t weightsCount,
const onnxTensorDescriptorV1* weightDescriptors,
- onnxGraph* graph)
+ onnxGraph* graph,
+ uint32_t maxSeqLength,
+ void* deferredWeightReader)
{
if (graph == NULL) {
return ONNXIFI_STATUS_INVALID_POINTER;
@@ -797,7 +799,9 @@
onnxModel,
weightsCount,
weightDescriptors,
- &graph_wrapper->graph);
+ &graph_wrapper->graph,
+ maxSeqLength,
+ deferredWeightReader);
switch (status) {
case ONNXIFI_STATUS_SUCCESS:
case ONNXIFI_STATUS_FALLBACK:
--- a/foxi/onnxifi_dummy.c 2022-06-14 08:14:02.484503254 +0200
+++ b/foxi/onnxifi_dummy.c 2022-06-14 08:17:01.408891030 +0200
@@ -103,7 +103,9 @@
const void* onnxModel,
uint32_t weightCount,
const onnxTensorDescriptorV1* weightDescriptors,
- onnxGraph* graph) {
+ onnxGraph* graph,
+ uint32_t maxSeqLength,
+ void* deferredWeightReader) {
if (graph == NULL) {
return ONNXIFI_STATUS_INVALID_POINTER;
}
@@ -215,6 +217,8 @@
onnxWaitEventFor(onnxEvent event,
uint32_t timeoutMs,
onnxEventState* eventState,
- onnxStatus* eventStatus) {
+ onnxStatus* eventStatus,
+ char* message,
+ size_t* messageLength) {
return ONNXIFI_STATUS_SUCCESS;
-}
\ No newline at end of file
+}
|