Skip to content

Commit dbfe25c

Browse files
committed
chore: get rid of ExecutorchModule, cleanup TypeConcepts
1 parent 9360aa2 commit dbfe25c

5 files changed

Lines changed: 1 addition & 164 deletions

File tree

packages/react-native-executorch/common/rnexecutorch/RnExecutorchInstaller.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "RnExecutorchInstaller.h"
22

3-
#include <rnexecutorch/bindings/ExecutorchModule.h>
43
#include <rnexecutorch/host_objects/JsiConversions.h>
54
#include <rnexecutorch/models/classification/Classification.h>
65
#include <rnexecutorch/models/image_segmentation/ImageSegmentation.h>

packages/react-native-executorch/common/rnexecutorch/RnExecutorchInstaller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RnExecutorchInstaller {
2626
FetchUrlFunc_t fetchDataFromUrl);
2727

2828
private:
29-
template <UnloadableExternalMemoryAware ModelT>
29+
template <typename ModelT>
3030
static jsi::Function
3131
loadModel(jsi::Runtime *jsiRuntime,
3232
std::shared_ptr<react::CallInvoker> jsCallInvoker,

packages/react-native-executorch/common/rnexecutorch/TypeConcepts.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,4 @@ concept HasGenerate = requires(T t) {
1313
{ &T::generate };
1414
};
1515

16-
// When i make BaseModel have all of this methods we can then just check from
17-
// is_base_of instead of doing this for every single method
18-
template <typename T>
19-
concept HasForward = requires(T t) {
20-
{ &T::forward };
21-
};
22-
23-
template <typename T>
24-
concept HasMethodNames = requires(T t) {
25-
{ &T::methodNames };
26-
};
27-
28-
template <typename T>
29-
concept HasGetInputShape = requires(T t) {
30-
{ &T::getInputShape };
31-
};
32-
33-
template <typename T>
34-
concept HasIsLoaded = requires(T t) {
35-
{ &T::isLoaded };
36-
};
37-
38-
template <typename T>
39-
concept UnloadableExternalMemoryAware = requires(T t) {
40-
{ t.unload() } -> std::same_as<void>;
41-
{ t.getMemoryLowerBound() } -> std::same_as<std::size_t>;
42-
};
43-
4416
} // namespace rnexecutorch

packages/react-native-executorch/common/rnexecutorch/bindings/ExecutorchModule.cpp

Lines changed: 0 additions & 100 deletions
This file was deleted.

packages/react-native-executorch/common/rnexecutorch/bindings/ExecutorchModule.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)