diff options
author | David Elsing <david.elsing@posteo.net> | 2024-03-23 22:05:00 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-06-18 11:44:17 +0200 |
commit | 3ef0b4e402c20c245040e773e466afbb5cdcdee3 (patch) | |
tree | d96ef1399dc69454ae38e6172a250808609a5472 /gnu/packages/patches/foxi-fix-build.patch | |
parent | 35f4f3313842a670befebb7d4cb68b6de639af9e (diff) |
gnu: Add foxi.
* gnu/packages/machine-learning.scm (foxi): New variable.
* gnu/packages/patches/foxi-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches/foxi-fix-build.patch')
-rw-r--r-- | gnu/packages/patches/foxi-fix-build.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/patches/foxi-fix-build.patch b/gnu/packages/patches/foxi-fix-build.patch new file mode 100644 index 00000000000..d82090ad384 --- /dev/null +++ b/gnu/packages/patches/foxi-fix-build.patch @@ -0,0 +1,55 @@ +Taken from https://github.com/houseroad/foxi/pull/25. + +diff --git a/foxi/onnxifi_dummy.c b/foxi/onnxifi_dummy.c +index 2115af9..73e25fc 100644 +--- a/foxi/onnxifi_dummy.c ++++ b/foxi/onnxifi_dummy.c +@@ -103,7 +103,10 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI onnxInitGraph( + 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 +218,8 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI + 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 +diff --git a/foxi/onnxifi_wrapper.c b/foxi/onnxifi_wrapper.c +index 98a9325..abe1440 100644 +--- a/foxi/onnxifi_wrapper.c ++++ b/foxi/onnxifi_wrapper.c +@@ -761,7 +761,9 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph( + 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 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph( + onnxModel, + weightsCount, + weightDescriptors, +- &graph_wrapper->graph); ++ &graph_wrapper->graph, ++ maxSeqLength, ++ deferredWeightReader); + switch (status) { + case ONNXIFI_STATUS_SUCCESS: + case ONNXIFI_STATUS_FALLBACK: |