| 1 | Taken from https://github.com/houseroad/foxi/pull/25.
|
| 2 |
|
| 3 | diff --git a/foxi/onnxifi_dummy.c b/foxi/onnxifi_dummy.c
|
| 4 | index 2115af9..73e25fc 100644
|
| 5 | |
| 6 | |
| 7 | @@ -103,7 +103,10 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI onnxInitGraph(
|
| 8 | const void* onnxModel,
|
| 9 | uint32_t weightCount,
|
| 10 | const onnxTensorDescriptorV1* weightDescriptors,
|
| 11 | - onnxGraph* graph) {
|
| 12 | + onnxGraph* graph,
|
| 13 | + uint32_t maxSeqLength,
|
| 14 | + void* deferredWeightReader) {
|
| 15 | +
|
| 16 | if (graph == NULL) {
|
| 17 | return ONNXIFI_STATUS_INVALID_POINTER;
|
| 18 | }
|
| 19 | @@ -215,6 +218,8 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI
|
| 20 | onnxWaitEventFor(onnxEvent event,
|
| 21 | uint32_t timeoutMs,
|
| 22 | onnxEventState* eventState,
|
| 23 | - onnxStatus* eventStatus) {
|
| 24 | + onnxStatus* eventStatus,
|
| 25 | + char* message,
|
| 26 | + size_t* messageLength) {
|
| 27 | return ONNXIFI_STATUS_SUCCESS;
|
| 28 | }
|
| 29 | \ No newline at end of file
|
| 30 | diff --git a/foxi/onnxifi_wrapper.c b/foxi/onnxifi_wrapper.c
|
| 31 | index 98a9325..abe1440 100644
|
| 32 | |
| 33 | |
| 34 | @@ -761,7 +761,9 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph(
|
| 35 | const void* onnxModel,
|
| 36 | uint32_t weightsCount,
|
| 37 | const onnxTensorDescriptorV1* weightDescriptors,
|
| 38 | - onnxGraph* graph)
|
| 39 | + onnxGraph* graph,
|
| 40 | + uint32_t maxSeqLength,
|
| 41 | + void* deferredWeightReader)
|
| 42 | {
|
| 43 | if (graph == NULL) {
|
| 44 | return ONNXIFI_STATUS_INVALID_POINTER;
|
| 45 | @@ -797,7 +799,9 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph(
|
| 46 | onnxModel,
|
| 47 | weightsCount,
|
| 48 | weightDescriptors,
|
| 49 | - &graph_wrapper->graph);
|
| 50 | + &graph_wrapper->graph,
|
| 51 | + maxSeqLength,
|
| 52 | + deferredWeightReader);
|
| 53 | switch (status) {
|
| 54 | case ONNXIFI_STATUS_SUCCESS:
|
| 55 | case ONNXIFI_STATUS_FALLBACK:
|