Skip to content

Commit

Permalink
Merge pull request #271 from asus4/fix-xnnpack-build
Browse files Browse the repository at this point in the history
Fix linker error on iOS && Unity LTS2021
  • Loading branch information
asus4 authored Dec 29, 2022
2 parents b1e6b41 + 1a7d86e commit 9645932
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,16 @@ public static XNNPackDelegate DelegateForType(Type inputType)
[DllImport(TensorFlowLibrary)]
private static extern unsafe void TfLiteXNNPackDelegateDelete(TfLiteDelegate xnnPackDelegate);

// Weights Cache is disable due to build error in iOS and Unity 2021 LTS.
// https://github.com/asus4/tf-lite-unity-sample/issues/261

// Creates a new weights cache that can be shared with multiple delegate instances.
[DllImport(TensorFlowLibrary)]
private static extern unsafe TfLiteXNNPackDelegateWeightsCache TfLiteXNNPackDelegateWeightsCacheCreate();
// [DllImport(TensorFlowLibrary)]
// private static extern unsafe TfLiteXNNPackDelegateWeightsCache TfLiteXNNPackDelegateWeightsCacheCreate();

// Destroys a weights cache created with `TfLiteXNNPackDelegateWeightsCacheCreate` call.
[DllImport(TensorFlowLibrary)]
private static extern unsafe void TfLiteXNNPackWeightsCacheDelete(TfLiteXNNPackDelegateWeightsCache cache);
// [DllImport(TensorFlowLibrary)]
// private static extern unsafe void TfLiteXNNPackWeightsCacheDelete(TfLiteXNNPackDelegateWeightsCache cache);
#endregion // Externs
}
}

0 comments on commit 9645932

Please sign in to comment.