You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-libs/foxi/files/foxi-2021.05.27-gentoo.patch

74 lines
2.3 KiB

--- 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
+}