diff --git a/apps/android_rpc/app/src/main/jni/Application.mk b/apps/android_rpc/app/src/main/jni/Application.mk index aef7629990c2..548b69160b17 100644 --- a/apps/android_rpc/app/src/main/jni/Application.mk +++ b/apps/android_rpc/app/src/main/jni/Application.mk @@ -23,3 +23,7 @@ ifeq ($(USE_VULKAN), 1) APP_CPPFLAGS += -DTVM_VULKAN_RUNTIME=1 APP_LDFLAGS += -lvulkan endif + +ifeq ($(USE_SORT), 1) + APP_CPPFLAGS += -DUSE_SORT=1 +endif diff --git a/apps/android_rpc/app/src/main/jni/make/config.mk b/apps/android_rpc/app/src/main/jni/make/config.mk index c40ce4ba3ec7..f61811bd604e 100644 --- a/apps/android_rpc/app/src/main/jni/make/config.mk +++ b/apps/android_rpc/app/src/main/jni/make/config.mk @@ -22,6 +22,9 @@ USE_OPENCL = 0 # whether to enable Vulkan during compile USE_VULKAN = 0 +# whether to enable contrib sort functions during compile +USE_SORT = 1 + ifeq ($(USE_VULKAN), 1) # Statically linking vulkan requires API Level 24 or higher APP_PLATFORM = android-24 diff --git a/apps/android_rpc/app/src/main/jni/tvm_runtime.h b/apps/android_rpc/app/src/main/jni/tvm_runtime.h index 60b41baaf8e7..aadc4d188430 100644 --- a/apps/android_rpc/app/src/main/jni/tvm_runtime.h +++ b/apps/android_rpc/app/src/main/jni/tvm_runtime.h @@ -66,6 +66,10 @@ #include "../src/runtime/vulkan/vulkan_module.cc" #endif +#ifdef USE_SORT +#include "../src/contrib/sort/sort.cc" +#endif + #include