Drop nuphar from java API (#13107)

Drop nuphar from:

- java API
- tvm.cmake
- run_build.sh
This commit is contained in:
RandySheriffH 2022-09-26 17:06:08 -07:00 committed by GitHub
parent 0e98fb4e9b
commit 77a066c700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 43 deletions

View file

@ -21,22 +21,4 @@ if (onnxruntime_USE_TVM)
set(tvm_INCLUDE_DIRS ${tvm_SOURCE_DIR}/include)
endif()
if (onnxruntime_USE_NUPHAR)
message(STATUS "onnxruntime_USE_NUPHAR: Fetch onnxruntime-tvm for NUPHAR EP")
FetchContent_Declare(
tvm
GIT_REPOSITORY https://github.com/microsoft/onnxruntime-tvm.git
GIT_TAG 9ec2b92d180dff8877e402018b97baa574031b8b
)
FetchContent_GetProperties(tvm)
if(NOT tvm_POPULATED)
FetchContent_Populate(tvm)
endif()
set(tvm_INCLUDE_DIRS ${tvm_SOURCE_DIR}/include)
endif()
endif()

View file

@ -13,7 +13,6 @@ public enum OrtProvider {
CUDA("CUDAExecutionProvider"),
DNNL("DnnlExecutionProvider"),
OPEN_VINO("OpenVINOExecutionProvider"),
NUPHAR("NupharExecutionProvider"),
VITIS_AI("VitisAIExecutionProvider"),
TENSOR_RT("TensorrtExecutionProvider"),
NNAPI("NnapiExecutionProvider"),

View file

@ -1090,10 +1090,6 @@ public class OrtSession implements AutoCloseable {
private native void addNnapi(long apiHandle, long nativeHandle, int nnapiFlags)
throws OrtException;
private native void addNuphar(
long apiHandle, long nativeHandle, int allowUnalignedBuffers, String settings)
throws OrtException;
private native void addTvm(long apiHandle, long nativeHandle, String settings)
throws OrtException;

View file

@ -484,24 +484,6 @@ JNIEXPORT void JNICALL Java_ai_onnxruntime_OrtSession_00024SessionOptions_addNna
#endif
}
/*
* Class: ai_onnxruntime_OrtSession_SessionOptions
* Method: addNuphar
* Signature: (JILjava/lang/String)V
*/
JNIEXPORT void JNICALL Java_ai_onnxruntime_OrtSession_00024SessionOptions_addNuphar
(JNIEnv * jniEnv, jobject jobj, jlong apiHandle, jlong handle, jint allowUnalignedBuffers, jstring settingsString) {
(void)jobj;
#ifdef USE_NUPHAR
const char* settings = (*jniEnv)->GetStringUTFChars(jniEnv, settingsString, NULL);
checkOrtStatus(jniEnv,(const OrtApi*)apiHandle,OrtSessionOptionsAppendExecutionProvider_Nuphar((OrtSessionOptions*) handle, allowUnalignedBuffers, settings));
(*jniEnv)->ReleaseStringUTFChars(jniEnv,settingsString,settings);
#else
(void)apiHandle;(void)handle;(void)allowUnalignedBuffers;(void)settingsString; // Parameters used when Nuphar is defined.
throwOrtException(jniEnv,convertErrorCode(ORT_INVALID_ARGUMENT),"This binary was not compiled with Nuphar support.");
#endif
}
/*
* Class:: ai_onnxruntime_OrtSession_SessionOptions
* Method: addTvm

View file

@ -35,7 +35,7 @@ if [ $BUILD_OS = "yocto" ]; then
cd build
. /opt/fsl-imx-xwayland/$YOCTO_FOLDER/environment-setup-aarch64-poky-linux
alias cmake="/usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
cmake ../cmake -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=ON -Donnxruntime_DEV_MODE=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -Donnxruntime_USE_CUDA=OFF -Donnxruntime_USE_NSYNC=OFF -Donnxruntime_CUDNN_HOME= -Donnxruntime_USE_JEMALLOC=OFF -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_CSHARP=OFF -Donnxruntime_USE_EIGEN_FOR_BLAS=ON -Donnxruntime_USE_OPENBLAS=OFF -Donnxruntime_USE_ACL=ON -Donnxruntime_USE_MKLDNN=OFF -Donnxruntime_USE_MKLML=OFF -Donnxruntime_USE_NUPHAR_TVM=OFF -Donnxruntime_USE_LLVM=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_NUPHAR=OFF -Donnxruntime_USE_EIGEN_THREADPOOL=OFF -Donnxruntime_BUILD_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc
cmake ../cmake -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=ON -Donnxruntime_DEV_MODE=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -Donnxruntime_USE_CUDA=OFF -Donnxruntime_USE_NSYNC=OFF -Donnxruntime_CUDNN_HOME= -Donnxruntime_USE_JEMALLOC=OFF -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_CSHARP=OFF -Donnxruntime_USE_EIGEN_FOR_BLAS=ON -Donnxruntime_USE_OPENBLAS=OFF -Donnxruntime_USE_ACL=ON -Donnxruntime_USE_MKLDNN=OFF -Donnxruntime_USE_MKLML=OFF -Donnxruntime_USE_LLVM=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_NUPHAR=OFF -Donnxruntime_USE_EIGEN_THREADPOOL=OFF -Donnxruntime_BUILD_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/opt/fsl-imx-xwayland/$YOCTO_FOLDER/sysroots/aarch64-poky-linux/usr/include -DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc
make -j$(nproc)
else