From 0a04c92d2e4ed28bf6f49e7ae70d8ff7b5d0a7b1 Mon Sep 17 00:00:00 2001 From: Valery Chernov Date: Wed, 12 Jan 2022 10:31:11 +0300 Subject: [PATCH] clean build scripts, java frontend and others #2 --- cmake/onnxruntime_unittests.cmake | 4 ++-- .../InferenceTest.cs | 2 +- java/src/main/java/ai/onnxruntime/OrtSession.java | 8 ++++---- onnxruntime/python/onnxruntime_pybind_state_common.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 485674ec6f1f2..b6eb2366f79fb 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -1288,8 +1288,8 @@ if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD endif() if (onnxruntime_USE_TVM) - # find_library(STVM_LIBS NAMES libtvm.so PATHS ${onnxruntime_TVM_HOME}/lib) - # link_directories(onnxruntime_test_all ${STVM_LIBS}) + # find_library(TVM_LIBS NAMES libtvm.so PATHS ${onnxruntime_TVM_HOME}/lib) + # link_directories(onnxruntime_test_all ${TVM_LIBS}) find_library(PYTHON_LIBS NAMES libpython PATHS /usr/local/lib) #target_link_libraries(onnxruntime_test_all PRIVATE ${PYTHON_LIBRARIES} -lutil) # set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-rpath,${TVM_LIBS}") diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/InferenceTest.cs b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/InferenceTest.cs index b292fe989d14f..202025df7bb11 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/InferenceTest.cs +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/InferenceTest.cs @@ -119,7 +119,7 @@ public void TestSessionOptions() #endif #if USE_TVM - opt.AppendExecutionProvider_Stvm("Vulkan -device=amd_apu"); + opt.AppendExecutionProvider_Tvm("Vulkan -device=amd_apu"); #endif #if USE_NUPHAR diff --git a/java/src/main/java/ai/onnxruntime/OrtSession.java b/java/src/main/java/ai/onnxruntime/OrtSession.java index 2f2b39dc8d09d..34b707f3de9f2 100644 --- a/java/src/main/java/ai/onnxruntime/OrtSession.java +++ b/java/src/main/java/ai/onnxruntime/OrtSession.java @@ -890,14 +890,14 @@ public void addNuphar(boolean allowUnalignedBuffers, String settings) throws Ort } /** - * Adds Stvm as an execution backend. + * Adds TVM as an execution backend. * * @param settings See the documentation for valid settings strings. * @throws OrtException If there was an error in native code. */ - public void addStvm(String settings) throws OrtException { + public void addTvm(String settings) throws OrtException { checkClosed(); - addStvm(OnnxRuntime.ortApiHandle, nativeHandle, settings); + addTvm(OnnxRuntime.ortApiHandle, nativeHandle, settings); } /** @@ -1045,7 +1045,7 @@ private native void addNuphar( long apiHandle, long nativeHandle, int allowUnalignedBuffers, String settings) throws OrtException; - private native void addStvm( + private native void addTvm( long apiHandle, long nativeHandle, String settings) throws OrtException; diff --git a/onnxruntime/python/onnxruntime_pybind_state_common.h b/onnxruntime/python/onnxruntime_pybind_state_common.h index 097fef00bb933..093fced91c3ba 100644 --- a/onnxruntime/python/onnxruntime_pybind_state_common.h +++ b/onnxruntime/python/onnxruntime_pybind_state_common.h @@ -87,7 +87,7 @@ struct OrtStatus { #endif #ifdef USE_TVM -#define BACKEND_STVM "-STVM" +#define BACKEND_TVM "-TVM" #else #define BACKEND_TVM "" #endif