diff --git a/apps/android_deploy/README.md b/apps/android_deploy/README.md index 0a81ffd26d6a..8cb5fac4ebbd 100644 --- a/apps/android_deploy/README.md +++ b/apps/android_deploy/README.md @@ -21,7 +21,7 @@ This folder contains Android Demo app that allows us to show how to deploy model You will need [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), [Android SDK](https://developer.android.com/studio/index.html), [Android NDK](https://developer.android.com/ndk) and an Android device to use this. Make sure the `ANDROID_HOME` variable already points to your Android SDK folder or set it using `export ANDROID_HOME=[Path to your Android SDK, e.g., ~/Android/sdk]`. We use [Gradle](https://gradle.org) to build. Please follow [the installation instruction](https://gradle.org/install) for your operating system. -Alternatively, you may execute Docker image we provide wich contains the required packages. Use the command below to build the image and enter interactive session. Note, that building with OpenCL was not tested from Docker. +Alternatively, you may execute Docker image we provide which contains the required packages. Use the command below to build the image and enter interactive session. Note, that building with OpenCL was not tested from Docker. ```bash ./docker/build.sh demo_android -it bash @@ -45,7 +45,7 @@ dependencies { compile 'com.android.support:appcompat-v7:26.0.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:design:26.0.1' - compile 'ml.dmlc.tvm:tvm4j-core:0.0.1-SNAPSHOT' + compile 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' testCompile 'junit:junit:4.12' } ``` @@ -124,7 +124,7 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain- Follow instruction to get compiled version model for android target [here.](http://docs.tvm.ai/deploy/android.html) -Copied these compiled model deploy_lib.so, deploy_graph.json and deploy_param.params to apps/android_deploy/app/src/main/assets/ and modify TVM flavor changes on [java](https://github.com/apache/incubator-tvm/blob/master/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java#L81) +Copied these compiled model deploy_lib.so, deploy_graph.json and deploy_param.params to apps/android_deploy/app/src/main/assets/ and modify TVM flavor changes on [java](https://github.com/apache/incubator-tvm/blob/master/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java#L81) `CPU Verison flavor` ``` diff --git a/apps/android_deploy/app/build.gradle b/apps/android_deploy/app/build.gradle index 76471aefa4f6..c00528ba49fd 100644 --- a/apps/android_deploy/app/build.gradle +++ b/apps/android_deploy/app/build.gradle @@ -38,7 +38,7 @@ android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { - applicationId "ml.dmlc.tvm.android.demo" + applicationId "org.apache.tvm.android.demo" minSdkVersion 17 targetSdkVersion 26 versionCode 1 @@ -68,6 +68,6 @@ dependencies { compile 'com.android.support:appcompat-v7:26.0.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:design:26.0.1' - compile 'ml.dmlc.tvm:tvm4j-core:0.0.1-SNAPSHOT' + compile 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' testCompile 'junit:junit:4.12' } diff --git a/apps/android_deploy/app/src/main/AndroidManifest.xml b/apps/android_deploy/app/src/main/AndroidManifest.xml index 107dcfee54a8..bf3463f4d9c6 100644 --- a/apps/android_deploy/app/src/main/AndroidManifest.xml +++ b/apps/android_deploy/app/src/main/AndroidManifest.xml @@ -20,7 +20,7 @@ under the License. --> + package="org.apache.tvm.android.demo" > @@ -32,7 +32,7 @@ under the License. android:supportsRtl="true" android:theme="@style/AppTheme" > diff --git a/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java b/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java similarity index 99% rename from apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java rename to apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java index 7d391856f599..43a279b820d7 100644 --- a/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java +++ b/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.android.demo; +package org.apache.tvm.android.demo; import android.Manifest; import android.content.Intent; @@ -53,12 +53,12 @@ import java.util.Date; import java.util.Vector; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.NDArray; -import ml.dmlc.tvm.TVMContext; -import ml.dmlc.tvm.TVMValue; -import ml.dmlc.tvm.TVMType; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.NDArray; +import org.apache.tvm.TVMContext; +import org.apache.tvm.TVMValue; +import org.apache.tvm.TVMType; public class MainActivity extends AppCompatActivity { private static final String TAG = MainActivity.class.getSimpleName(); diff --git a/apps/android_deploy/app/src/main/jni/Android.mk b/apps/android_deploy/app/src/main/jni/Android.mk index da5f499ea706..33a7ac80190d 100644 --- a/apps/android_deploy/app/src/main/jni/Android.mk +++ b/apps/android_deploy/app/src/main/jni/Android.mk @@ -16,7 +16,7 @@ endif include $(config) -LOCAL_SRC_FILES := ml_dmlc_tvm_native_c_api.cc +LOCAL_SRC_FILES := org_apache_tvm_native_c_api.cc LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib/ -llog LOCAL_C_INCLUDES := $(ROOT_PATH)/include \ diff --git a/apps/android_deploy/app/src/main/jni/build.sh b/apps/android_deploy/app/src/main/jni/build.sh index 2d2e6f5e4a50..1e0bf29108b9 100644 --- a/apps/android_deploy/app/src/main/jni/build.sh +++ b/apps/android_deploy/app/src/main/jni/build.sh @@ -18,8 +18,8 @@ PATH="$PATH:/usr/local/bin" CURR_DIR=$(cd `dirname $0`; pwd) ROOT_DIR="$CURR_DIR/../../../../../.." -javah -o $CURR_DIR/ml_dmlc_tvm_native_c_api.h -cp "$ROOT_DIR/jvm/core/target/*" ml.dmlc.tvm.LibInfo || exit -1 -cp -f $ROOT_DIR/jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc $CURR_DIR/ || exit -1 +javah -o $CURR_DIR/org_apache_tvm_native_c_api.h -cp "$ROOT_DIR/jvm/core/target/*" org.apache.tvm.LibInfo || exit -1 +cp -f $ROOT_DIR/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc $CURR_DIR/ || exit -1 cp -f $ROOT_DIR/jvm/native/src/main/native/jni_helper_func.h $CURR_DIR/ || exit -1 rm -rf $CURR_DIR/../libs ndk-build --directory=$CURR_DIR diff --git a/apps/android_deploy/app/src/main/res/layout/activity_main.xml b/apps/android_deploy/app/src/main/res/layout/activity_main.xml index 741b04434765..0778374223d8 100644 --- a/apps/android_deploy/app/src/main/res/layout/activity_main.xml +++ b/apps/android_deploy/app/src/main/res/layout/activity_main.xml @@ -25,7 +25,7 @@ under the License. xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context="ml.dmlc.tvm.android.demo.MainActivity"> + tools:context="org.apache.tvm.android.demo.MainActivity"> + package="org.apache.tvm.tvmrpc" > diff --git a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/MainActivity.java b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/MainActivity.java similarity index 96% rename from apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/MainActivity.java rename to apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/MainActivity.java index 2ea4e4cb7528..35105df92b0d 100644 --- a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/MainActivity.java +++ b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/MainActivity.java @@ -15,27 +15,21 @@ * limitations under the License. */ -package ml.dmlc.tvm.tvmrpc; +package org.apache.tvm.tvmrpc; -import android.annotation.SuppressLint; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; -import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.Switch; -import android.widget.Button; -import android.view.View; import android.content.Intent; -import android.app.NotificationChannel; -import android.app.NotificationManager; public class MainActivity extends AppCompatActivity { diff --git a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCActivity.java b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCActivity.java similarity index 98% rename from apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCActivity.java rename to apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCActivity.java index 912a7c9e69a6..54182d77e170 100644 --- a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCActivity.java +++ b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCActivity.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.tvmrpc; +package org.apache.tvm.tvmrpc; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; diff --git a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCProcessor.java b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCProcessor.java similarity index 95% rename from apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCProcessor.java rename to apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCProcessor.java index 3eb73059407d..ca0c9c8f7584 100644 --- a/apps/android_rpc/app/src/main/java/ml/dmlc/tvm/tvmrpc/RPCProcessor.java +++ b/apps/android_rpc/app/src/main/java/org/apache/tvm/tvmrpc/RPCProcessor.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package ml.dmlc.tvm.tvmrpc; +package org.apache.tvm.tvmrpc; import android.os.ParcelFileDescriptor; import java.net.Socket; -import ml.dmlc.tvm.rpc.ConnectTrackerServerProcessor; -import ml.dmlc.tvm.rpc.RPCWatchdog; +import org.apache.tvm.rpc.ConnectTrackerServerProcessor; +import org.apache.tvm.rpc.RPCWatchdog; /** * Connect to RPC proxy and deal with requests. diff --git a/apps/android_rpc/app/src/main/jni/Android.mk b/apps/android_rpc/app/src/main/jni/Android.mk index da5f499ea706..33a7ac80190d 100644 --- a/apps/android_rpc/app/src/main/jni/Android.mk +++ b/apps/android_rpc/app/src/main/jni/Android.mk @@ -16,7 +16,7 @@ endif include $(config) -LOCAL_SRC_FILES := ml_dmlc_tvm_native_c_api.cc +LOCAL_SRC_FILES := org_apache_tvm_native_c_api.cc LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib/ -llog LOCAL_C_INCLUDES := $(ROOT_PATH)/include \ diff --git a/apps/android_rpc/app/src/main/jni/build.sh b/apps/android_rpc/app/src/main/jni/build.sh index 2d2e6f5e4a50..1e0bf29108b9 100755 --- a/apps/android_rpc/app/src/main/jni/build.sh +++ b/apps/android_rpc/app/src/main/jni/build.sh @@ -18,8 +18,8 @@ PATH="$PATH:/usr/local/bin" CURR_DIR=$(cd `dirname $0`; pwd) ROOT_DIR="$CURR_DIR/../../../../../.." -javah -o $CURR_DIR/ml_dmlc_tvm_native_c_api.h -cp "$ROOT_DIR/jvm/core/target/*" ml.dmlc.tvm.LibInfo || exit -1 -cp -f $ROOT_DIR/jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc $CURR_DIR/ || exit -1 +javah -o $CURR_DIR/org_apache_tvm_native_c_api.h -cp "$ROOT_DIR/jvm/core/target/*" org.apache.tvm.LibInfo || exit -1 +cp -f $ROOT_DIR/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc $CURR_DIR/ || exit -1 cp -f $ROOT_DIR/jvm/native/src/main/native/jni_helper_func.h $CURR_DIR/ || exit -1 rm -rf $CURR_DIR/../libs ndk-build --directory=$CURR_DIR diff --git a/apps/android_rpc/app/src/main/res/layout/activity_main.xml b/apps/android_rpc/app/src/main/res/layout/activity_main.xml index 35a2cfafab53..f5cad5443cd1 100644 --- a/apps/android_rpc/app/src/main/res/layout/activity_main.xml +++ b/apps/android_rpc/app/src/main/res/layout/activity_main.xml @@ -25,7 +25,7 @@ under the License. xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context="ml.dmlc.tvm.tvmrpc.MainActivity"> + tools:context="org.apache.tvm.tvmrpc.MainActivity"> + tools:context="org.apache.tvm.tvmrpc.RPCActivity"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-full-parent 0.0.1-SNAPSHOT ../pom.xml - ml.dmlc.tvm + org.apache.tvm tvm4j-full-linux-x86_64 0.0.1-SNAPSHOT TVM4J Package - Full Linux-x86_64 @@ -38,12 +38,12 @@ under the License. - ml.dmlc.tvm + org.apache.tvm tvm4j-core ${project.version} - ml.dmlc.tvm + org.apache.tvm libtvm4j-linux-x86_64 ${project.version} so diff --git a/jvm/assembly/linux-x86_64/src/main/assembly/assembly.xml b/jvm/assembly/linux-x86_64/src/main/assembly/assembly.xml index 8eba6c210ad6..c6a4d6228b87 100644 --- a/jvm/assembly/linux-x86_64/src/main/assembly/assembly.xml +++ b/jvm/assembly/linux-x86_64/src/main/assembly/assembly.xml @@ -48,7 +48,7 @@ under the License. false false - ml.dmlc.tvm:libtvm4j-linux-x86_64:so + org.apache.tvm:libtvm4j-linux-x86_64:so diff --git a/jvm/assembly/osx-x86_64/pom.xml b/jvm/assembly/osx-x86_64/pom.xml index 91545da9e641..175101b2ebba 100644 --- a/jvm/assembly/osx-x86_64/pom.xml +++ b/jvm/assembly/osx-x86_64/pom.xml @@ -24,13 +24,13 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-full-parent 0.0.1-SNAPSHOT ../pom.xml - ml.dmlc.tvm + org.apache.tvm tvm4j-full-osx-x86_64 0.0.1-SNAPSHOT TVM4J Package - Full OSX-x86_64 @@ -38,12 +38,12 @@ under the License. - ml.dmlc.tvm + org.apache.tvm tvm4j-core ${project.version} - ml.dmlc.tvm + org.apache.tvm libtvm4j-osx-x86_64 ${project.version} jnilib diff --git a/jvm/assembly/osx-x86_64/src/main/assembly/assembly.xml b/jvm/assembly/osx-x86_64/src/main/assembly/assembly.xml index 4a44de07c9bb..4173a9b77c28 100644 --- a/jvm/assembly/osx-x86_64/src/main/assembly/assembly.xml +++ b/jvm/assembly/osx-x86_64/src/main/assembly/assembly.xml @@ -48,7 +48,7 @@ under the License. false false - ml.dmlc.tvm:libtvm4j-osx-x86_64:jnilib + org.apache.tvm:libtvm4j-osx-x86_64:jnilib diff --git a/jvm/assembly/pom.xml b/jvm/assembly/pom.xml index 33a7c13a56c9..afbf5fe12c5c 100644 --- a/jvm/assembly/pom.xml +++ b/jvm/assembly/pom.xml @@ -24,13 +24,13 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-parent 0.0.1-SNAPSHOT ../pom.xml - ml.dmlc.tvm + org.apache.tvm tvm4j-full-parent 0.0.1-SNAPSHOT TVM4J Package - Full Parent diff --git a/jvm/core/pom.xml b/jvm/core/pom.xml index 849c86b10549..eb999f09bd51 100644 --- a/jvm/core/pom.xml +++ b/jvm/core/pom.xml @@ -24,13 +24,13 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-parent 0.0.1-SNAPSHOT ../pom.xml - ml.dmlc.tvm + org.apache.tvm tvm4j-core 0.0.1-SNAPSHOT TVM4J Package - Core diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/API.java b/jvm/core/src/main/java/org/apache/tvm/API.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/API.java rename to jvm/core/src/main/java/org/apache/tvm/API.java index 76dce8b0caac..9213b5116ffe 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/API.java +++ b/jvm/core/src/main/java/org/apache/tvm/API.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.util.HashMap; import java.util.Map; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/APIInternal.java b/jvm/core/src/main/java/org/apache/tvm/APIInternal.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/APIInternal.java rename to jvm/core/src/main/java/org/apache/tvm/APIInternal.java index 15a33a7a3f47..5be1364512d1 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/APIInternal.java +++ b/jvm/core/src/main/java/org/apache/tvm/APIInternal.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; /** * Internal api functions. diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/Base.java b/jvm/core/src/main/java/org/apache/tvm/Base.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/Base.java rename to jvm/core/src/main/java/org/apache/tvm/Base.java index 2684bdb77635..e6fef4153284 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/Base.java +++ b/jvm/core/src/main/java/org/apache/tvm/Base.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; -import ml.dmlc.tvm.NativeLibraryLoader.Action; +import org.apache.tvm.NativeLibraryLoader.Action; import java.io.File; import java.io.IOException; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/Function.java b/jvm/core/src/main/java/org/apache/tvm/Function.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/Function.java rename to jvm/core/src/main/java/org/apache/tvm/Function.java index a1939a25727a..a9ac70722410 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/Function.java +++ b/jvm/core/src/main/java/org/apache/tvm/Function.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.util.ArrayList; import java.util.Collections; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/LibInfo.java b/jvm/core/src/main/java/org/apache/tvm/LibInfo.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/LibInfo.java rename to jvm/core/src/main/java/org/apache/tvm/LibInfo.java index 065590f2cfcd..4c5e0a66bf87 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/LibInfo.java +++ b/jvm/core/src/main/java/org/apache/tvm/LibInfo.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.util.List; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/Module.java b/jvm/core/src/main/java/org/apache/tvm/Module.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/Module.java rename to jvm/core/src/main/java/org/apache/tvm/Module.java index b446ef10a680..14961317b88c 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/Module.java +++ b/jvm/core/src/main/java/org/apache/tvm/Module.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.util.HashMap; import java.util.Map; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/NDArray.java b/jvm/core/src/main/java/org/apache/tvm/NDArray.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/NDArray.java rename to jvm/core/src/main/java/org/apache/tvm/NDArray.java index 431924c4c9b0..4e7386b123f8 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/NDArray.java +++ b/jvm/core/src/main/java/org/apache/tvm/NDArray.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/NDArrayBase.java b/jvm/core/src/main/java/org/apache/tvm/NDArrayBase.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/NDArrayBase.java rename to jvm/core/src/main/java/org/apache/tvm/NDArrayBase.java index ff75bf9489b9..5ac630d3a668 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/NDArrayBase.java +++ b/jvm/core/src/main/java/org/apache/tvm/NDArrayBase.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; /** * Base class of NDArray. To handle callback array. diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/NativeLibraryLoader.java b/jvm/core/src/main/java/org/apache/tvm/NativeLibraryLoader.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/NativeLibraryLoader.java rename to jvm/core/src/main/java/org/apache/tvm/NativeLibraryLoader.java index 396f740b914f..9922709076ed 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/NativeLibraryLoader.java +++ b/jvm/core/src/main/java/org/apache/tvm/NativeLibraryLoader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import java.io.File; import java.io.FileInputStream; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMContext.java b/jvm/core/src/main/java/org/apache/tvm/TVMContext.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMContext.java rename to jvm/core/src/main/java/org/apache/tvm/TVMContext.java index d9051f0d9d4d..9bc59651d931 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMContext.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMContext.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; -import ml.dmlc.tvm.rpc.RPC; +import org.apache.tvm.rpc.RPC; import java.util.HashMap; import java.util.Map; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMType.java b/jvm/core/src/main/java/org/apache/tvm/TVMType.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMType.java rename to jvm/core/src/main/java/org/apache/tvm/TVMType.java index e6b5e2ea1b9c..1c2719eeca90 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMType.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMType.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMType { public static final int INT = 0; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValue.java b/jvm/core/src/main/java/org/apache/tvm/TVMValue.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValue.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValue.java index efea02b23e5d..92c7623b2dc1 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValue.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValue.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValue { public final TypeCode typeCode; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueBytes.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueBytes.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueBytes.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueBytes.java index 0bd230695ee2..6c7c1c892747 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueBytes.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueBytes.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValueBytes extends TVMValue { public final byte[] value; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueDouble.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueDouble.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueDouble.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueDouble.java index ed02a0e2f966..d94b011d7e10 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueDouble.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueDouble.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValueDouble extends TVMValue { public final double value; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueHandle.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueHandle.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueHandle.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueHandle.java index b4316b7e72f3..8ab7572d1cfd 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueHandle.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueHandle.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; /** * Java class related to TVM handles (TypeCode.HANDLE) diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueLong.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueLong.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueLong.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueLong.java index e1a2f6e150b8..5dba2fd459f6 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueLong.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueLong.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValueLong extends TVMValue { public final long value; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueNull.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueNull.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueNull.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueNull.java index 4cd9048e1c81..03c0ea0dbcd4 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueNull.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueNull.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValueNull extends TVMValue { public TVMValueNull() { diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueString.java b/jvm/core/src/main/java/org/apache/tvm/TVMValueString.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/TVMValueString.java rename to jvm/core/src/main/java/org/apache/tvm/TVMValueString.java index 671ff2225f82..260803e8e897 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueString.java +++ b/jvm/core/src/main/java/org/apache/tvm/TVMValueString.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; public class TVMValueString extends TVMValue { public final String value; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/TypeCode.java b/jvm/core/src/main/java/org/apache/tvm/TypeCode.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/TypeCode.java rename to jvm/core/src/main/java/org/apache/tvm/TypeCode.java index 1f01fde6d307..2d21e4afa6b4 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/TypeCode.java +++ b/jvm/core/src/main/java/org/apache/tvm/TypeCode.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; // Type code used in API calls public enum TypeCode { diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphModule.java b/jvm/core/src/main/java/org/apache/tvm/contrib/GraphModule.java similarity index 96% rename from jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphModule.java rename to jvm/core/src/main/java/org/apache/tvm/contrib/GraphModule.java index d7f22a96f0ea..64f089fb4eb1 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphModule.java +++ b/jvm/core/src/main/java/org/apache/tvm/contrib/GraphModule.java @@ -17,12 +17,12 @@ * under the License. */ -package ml.dmlc.tvm.contrib; +package org.apache.tvm.contrib; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.NDArray; -import ml.dmlc.tvm.TVMContext; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.NDArray; +import org.apache.tvm.TVMContext; /** * Wrapper runtime module. diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphRuntime.java b/jvm/core/src/main/java/org/apache/tvm/contrib/GraphRuntime.java similarity index 94% rename from jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphRuntime.java rename to jvm/core/src/main/java/org/apache/tvm/contrib/GraphRuntime.java index edcde0cc65ec..03695dc9045b 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/contrib/GraphRuntime.java +++ b/jvm/core/src/main/java/org/apache/tvm/contrib/GraphRuntime.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package ml.dmlc.tvm.contrib; +package org.apache.tvm.contrib; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.TVMContext; -import ml.dmlc.tvm.TVMValue; -import ml.dmlc.tvm.rpc.RPC; -import ml.dmlc.tvm.rpc.RPCSession; -import ml.dmlc.tvm.rpc.TVMRemoteContext; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.TVMContext; +import org.apache.tvm.TVMValue; +import org.apache.tvm.rpc.RPC; +import org.apache.tvm.rpc.RPCSession; +import org.apache.tvm.rpc.TVMRemoteContext; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Client.java b/jvm/core/src/main/java/org/apache/tvm/rpc/Client.java similarity index 94% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/Client.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/Client.java index 20292b7a6f82..5178ac900a36 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Client.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/Client.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.TVMValue; +import org.apache.tvm.Function; +import org.apache.tvm.TVMValue; public class Client { /** diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectProxyServerProcessor.java b/jvm/core/src/main/java/org/apache/tvm/rpc/ConnectProxyServerProcessor.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectProxyServerProcessor.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/ConnectProxyServerProcessor.java index 04888f568be3..2a1b3e81c28d 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectProxyServerProcessor.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/ConnectProxyServerProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; import java.io.InputStream; import java.io.OutputStream; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectTrackerServerProcessor.java b/jvm/core/src/main/java/org/apache/tvm/rpc/ConnectTrackerServerProcessor.java similarity index 99% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectTrackerServerProcessor.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/ConnectTrackerServerProcessor.java index c449bb18a565..03c1a3e946dc 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ConnectTrackerServerProcessor.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/ConnectTrackerServerProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; import java.io.IOException; import java.io.InputStream; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/NativeServerLoop.java b/jvm/core/src/main/java/org/apache/tvm/rpc/NativeServerLoop.java similarity index 96% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/NativeServerLoop.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/NativeServerLoop.java index 697ce45fa04f..29a457f39a40 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/NativeServerLoop.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/NativeServerLoop.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.TVMValue; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.TVMValue; import java.io.File; import java.io.IOException; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPC.java b/jvm/core/src/main/java/org/apache/tvm/rpc/RPC.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPC.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/RPC.java index 8aa112d18b42..d4babb7a9307 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPC.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/RPC.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; +import org.apache.tvm.Function; import java.util.HashMap; import java.util.Map; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCSession.java b/jvm/core/src/main/java/org/apache/tvm/rpc/RPCSession.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCSession.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/RPCSession.java index 278ef9fe8eef..92b328488b40 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCSession.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/RPCSession.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.TVMContext; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.TVMContext; import java.io.File; import java.io.FileInputStream; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCWatchdog.java b/jvm/core/src/main/java/org/apache/tvm/rpc/RPCWatchdog.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCWatchdog.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/RPCWatchdog.java index 4df858cbd6bb..33dbdde4d4c9 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/RPCWatchdog.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/RPCWatchdog.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; /** * Watchdog for RPC. diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Server.java b/jvm/core/src/main/java/org/apache/tvm/rpc/Server.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/Server.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/Server.java index a9ea2d89a62c..c2835ac4edc3 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Server.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/Server.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; import java.io.IOException; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ServerProcessor.java b/jvm/core/src/main/java/org/apache/tvm/rpc/ServerProcessor.java similarity index 97% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/ServerProcessor.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/ServerProcessor.java index 5a3ab6adba29..c131de0be8f5 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ServerProcessor.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/ServerProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; /** * Abstract runnable class for RPC server process. diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/SocketChannel.java b/jvm/core/src/main/java/org/apache/tvm/rpc/SocketChannel.java similarity index 88% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/SocketChannel.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/SocketChannel.java index e72581b2358f..209267653747 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/SocketChannel.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/SocketChannel.java @@ -1,8 +1,8 @@ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.TVMValue; -import ml.dmlc.tvm.TVMValueBytes; +import org.apache.tvm.Function; +import org.apache.tvm.TVMValue; +import org.apache.tvm.TVMValueBytes; import java.io.IOException; import java.net.Socket; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/StandaloneServerProcessor.java b/jvm/core/src/main/java/org/apache/tvm/rpc/StandaloneServerProcessor.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/StandaloneServerProcessor.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/StandaloneServerProcessor.java index 2d2303d3fe8a..cc77654ea860 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/StandaloneServerProcessor.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/StandaloneServerProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; import java.io.IOException; import java.io.InputStream; diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/TVMRemoteContext.java b/jvm/core/src/main/java/org/apache/tvm/rpc/TVMRemoteContext.java similarity index 94% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/TVMRemoteContext.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/TVMRemoteContext.java index 8b4449aee44d..fad14eceb16b 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/TVMRemoteContext.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/TVMRemoteContext.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.TVMContext; +import org.apache.tvm.TVMContext; // always related to RPCSession. Cannot construct by users. public class TVMRemoteContext extends TVMContext { diff --git a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Utils.java b/jvm/core/src/main/java/org/apache/tvm/rpc/Utils.java similarity index 98% rename from jvm/core/src/main/java/ml/dmlc/tvm/rpc/Utils.java rename to jvm/core/src/main/java/org/apache/tvm/rpc/Utils.java index 0f241d12c558..9a186f3bbf94 100644 --- a/jvm/core/src/main/java/ml/dmlc/tvm/rpc/Utils.java +++ b/jvm/core/src/main/java/org/apache/tvm/rpc/Utils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; import java.io.IOException; import java.io.InputStream; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/FunctionTest.java b/jvm/core/src/test/java/org/apache/tvm/FunctionTest.java similarity index 99% rename from jvm/core/src/test/java/ml/dmlc/tvm/FunctionTest.java rename to jvm/core/src/test/java/org/apache/tvm/FunctionTest.java index 2b4e7eb3c8c5..9ffcc5ab65ea 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/FunctionTest.java +++ b/jvm/core/src/test/java/org/apache/tvm/FunctionTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import org.junit.Test; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/ModuleTest.java b/jvm/core/src/test/java/org/apache/tvm/ModuleTest.java similarity index 99% rename from jvm/core/src/test/java/ml/dmlc/tvm/ModuleTest.java rename to jvm/core/src/test/java/org/apache/tvm/ModuleTest.java index 5209da48bccb..d675ee4b9202 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/ModuleTest.java +++ b/jvm/core/src/test/java/org/apache/tvm/ModuleTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import org.junit.BeforeClass; import org.junit.Test; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/NDArrayTest.java b/jvm/core/src/test/java/org/apache/tvm/NDArrayTest.java similarity index 99% rename from jvm/core/src/test/java/ml/dmlc/tvm/NDArrayTest.java rename to jvm/core/src/test/java/org/apache/tvm/NDArrayTest.java index d3f62b0cf3a5..c4c34360f740 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/NDArrayTest.java +++ b/jvm/core/src/test/java/org/apache/tvm/NDArrayTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package ml.dmlc.tvm; +package org.apache.tvm; import org.junit.Test; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/TestUtils.java b/jvm/core/src/test/java/org/apache/tvm/TestUtils.java similarity index 95% rename from jvm/core/src/test/java/ml/dmlc/tvm/TestUtils.java rename to jvm/core/src/test/java/org/apache/tvm/TestUtils.java index 810fc04ac4d4..3431bf6c5c5c 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/TestUtils.java +++ b/jvm/core/src/test/java/org/apache/tvm/TestUtils.java @@ -1,4 +1,4 @@ -package ml.dmlc.tvm; +package org.apache.tvm; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -20,7 +20,7 @@ */ -import ml.dmlc.tvm.rpc.Server; +import org.apache.tvm.rpc.Server; import java.io.IOException; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/contrib/GraphRuntimeTest.java b/jvm/core/src/test/java/org/apache/tvm/contrib/GraphRuntimeTest.java similarity index 92% rename from jvm/core/src/test/java/ml/dmlc/tvm/contrib/GraphRuntimeTest.java rename to jvm/core/src/test/java/org/apache/tvm/contrib/GraphRuntimeTest.java index a29402867381..82096c1aa5dc 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/contrib/GraphRuntimeTest.java +++ b/jvm/core/src/test/java/org/apache/tvm/contrib/GraphRuntimeTest.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package ml.dmlc.tvm.contrib; - -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.NDArray; -import ml.dmlc.tvm.TVMContext; -import ml.dmlc.tvm.TestUtils; -import ml.dmlc.tvm.rpc.Client; -import ml.dmlc.tvm.rpc.RPCSession; -import ml.dmlc.tvm.rpc.Server; +package org.apache.tvm.contrib; + +import org.apache.tvm.Module; +import org.apache.tvm.NDArray; +import org.apache.tvm.TVMContext; +import org.apache.tvm.TestUtils; +import org.apache.tvm.rpc.Client; +import org.apache.tvm.rpc.RPCSession; +import org.apache.tvm.rpc.Server; import org.junit.BeforeClass; import org.junit.Test; import org.slf4j.Logger; diff --git a/jvm/core/src/test/java/ml/dmlc/tvm/rpc/RPCTest.java b/jvm/core/src/test/java/org/apache/tvm/rpc/RPCTest.java similarity index 95% rename from jvm/core/src/test/java/ml/dmlc/tvm/rpc/RPCTest.java rename to jvm/core/src/test/java/org/apache/tvm/rpc/RPCTest.java index 63cf5575b37d..07181642fbeb 100644 --- a/jvm/core/src/test/java/ml/dmlc/tvm/rpc/RPCTest.java +++ b/jvm/core/src/test/java/org/apache/tvm/rpc/RPCTest.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package ml.dmlc.tvm.rpc; +package org.apache.tvm.rpc; -import ml.dmlc.tvm.Function; -import ml.dmlc.tvm.Module; -import ml.dmlc.tvm.TVMValue; -import ml.dmlc.tvm.TestUtils; +import org.apache.tvm.Function; +import org.apache.tvm.Module; +import org.apache.tvm.TVMValue; +import org.apache.tvm.TestUtils; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; diff --git a/jvm/native/linux-x86_64/pom.xml b/jvm/native/linux-x86_64/pom.xml index 8ec24bc02c3c..e2b80b9161b5 100644 --- a/jvm/native/linux-x86_64/pom.xml +++ b/jvm/native/linux-x86_64/pom.xml @@ -24,7 +24,7 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-native-parent 0.0.1-SNAPSHOT ../pom.xml @@ -39,7 +39,7 @@ under the License. - ml.dmlc.tvm + org.apache.tvm tvm4j-core ${project.version} jar @@ -68,7 +68,7 @@ under the License. ../src/main/native - ml_dmlc_tvm_native_c_api.cc + org_apache_tvm_native_c_api.cc @@ -96,9 +96,9 @@ under the License. default ${project.build.directory}/custom-javah ${basedir} - ml_dmlc_tvm_native_c_api.h + org_apache_tvm_native_c_api.h - ml.dmlc.tvm.LibInfo + org.apache.tvm.LibInfo diff --git a/jvm/native/osx-x86_64/pom.xml b/jvm/native/osx-x86_64/pom.xml index 6ea59347726c..0a374beacfb7 100644 --- a/jvm/native/osx-x86_64/pom.xml +++ b/jvm/native/osx-x86_64/pom.xml @@ -24,7 +24,7 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-native-parent 0.0.1-SNAPSHOT ../pom.xml @@ -39,7 +39,7 @@ under the License. - ml.dmlc.tvm + org.apache.tvm tvm4j-core ${project.version} jar @@ -68,7 +68,7 @@ under the License. ../src/main/native - ml_dmlc_tvm_native_c_api.cc + org_apache_tvm_native_c_api.cc @@ -102,9 +102,9 @@ under the License. default ${project.build.directory}/custom-javah ${basedir} - ml_dmlc_tvm_native_c_api.h + org_apache_tvm_native_c_api.h - ml.dmlc.tvm.LibInfo + org.apache.tvm.LibInfo diff --git a/jvm/native/pom.xml b/jvm/native/pom.xml index 504e0c594006..f965a619328a 100644 --- a/jvm/native/pom.xml +++ b/jvm/native/pom.xml @@ -24,7 +24,7 @@ under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-parent 0.0.1-SNAPSHOT ../pom.xml diff --git a/jvm/native/src/main/native/jni_helper_func.h b/jvm/native/src/main/native/jni_helper_func.h index d58224fb2f25..14866206dc19 100644 --- a/jvm/native/src/main/native/jni_helper_func.h +++ b/jvm/native/src/main/native/jni_helper_func.h @@ -27,7 +27,7 @@ // Helper functions for RefXXX getter & setter jlong getLongField(JNIEnv *env, jobject obj) { - jclass refClass = env->FindClass("ml/dmlc/tvm/Base$RefLong"); + jclass refClass = env->FindClass("org/apache/tvm/Base$RefLong"); jfieldID refFid = env->GetFieldID(refClass, "value", "J"); jlong ret = env->GetLongField(obj, refFid); env->DeleteLocalRef(refClass); @@ -35,7 +35,7 @@ jlong getLongField(JNIEnv *env, jobject obj) { } jint getIntField(JNIEnv *env, jobject obj) { - jclass refClass = env->FindClass("ml/dmlc/tvm/Base$RefInt"); + jclass refClass = env->FindClass("org/apache/tvm/Base$RefInt"); jfieldID refFid = env->GetFieldID(refClass, "value", "I"); jint ret = env->GetIntField(obj, refFid); env->DeleteLocalRef(refClass); @@ -43,21 +43,21 @@ jint getIntField(JNIEnv *env, jobject obj) { } void setIntField(JNIEnv *env, jobject obj, jint value) { - jclass refClass = env->FindClass("ml/dmlc/tvm/Base$RefInt"); + jclass refClass = env->FindClass("org/apache/tvm/Base$RefInt"); jfieldID refFid = env->GetFieldID(refClass, "value", "I"); env->SetIntField(obj, refFid, value); env->DeleteLocalRef(refClass); } void setLongField(JNIEnv *env, jobject obj, jlong value) { - jclass refClass = env->FindClass("ml/dmlc/tvm/Base$RefLong"); + jclass refClass = env->FindClass("org/apache/tvm/Base$RefLong"); jfieldID refFid = env->GetFieldID(refClass, "value", "J"); env->SetLongField(obj, refFid, value); env->DeleteLocalRef(refClass); } void setStringField(JNIEnv *env, jobject obj, const char *value) { - jclass refClass = env->FindClass("ml/dmlc/tvm/Base$RefString"); + jclass refClass = env->FindClass("org/apache/tvm/Base$RefString"); jfieldID refFid = env->GetFieldID(refClass, "value", "Ljava/lang/String;"); env->SetObjectField(obj, refFid, env->NewStringUTF(value)); env->DeleteLocalRef(refClass); @@ -65,7 +65,7 @@ void setStringField(JNIEnv *env, jobject obj, const char *value) { // Helper functions for TVMValue jlong getTVMValueLongField(JNIEnv *env, jobject obj, - const char *clsname = "ml/dmlc/tvm/TVMValueLong") { + const char *clsname = "org/apache/tvm/TVMValueLong") { jclass cls = env->FindClass(clsname); jfieldID fid = env->GetFieldID(cls, "value", "J"); jlong ret = env->GetLongField(obj, fid); @@ -74,7 +74,7 @@ jlong getTVMValueLongField(JNIEnv *env, jobject obj, } jdouble getTVMValueDoubleField(JNIEnv *env, jobject obj) { - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueDouble"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueDouble"); jfieldID fid = env->GetFieldID(cls, "value", "D"); jdouble ret = env->GetDoubleField(obj, fid); env->DeleteLocalRef(cls); @@ -82,7 +82,7 @@ jdouble getTVMValueDoubleField(JNIEnv *env, jobject obj) { } jstring getTVMValueStringField(JNIEnv *env, jobject obj) { - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueString"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueString"); jfieldID fid = env->GetFieldID(cls, "value", "Ljava/lang/String;"); jstring ret = static_cast(env->GetObjectField(obj, fid)); env->DeleteLocalRef(cls); @@ -90,7 +90,7 @@ jstring getTVMValueStringField(JNIEnv *env, jobject obj) { } jobject newTVMValueHandle(JNIEnv *env, jlong value) { - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueHandle"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueHandle"); jmethodID constructor = env->GetMethodID(cls, "", "(J)V"); jobject object = env->NewObject(cls, constructor, value); env->DeleteLocalRef(cls); @@ -98,7 +98,7 @@ jobject newTVMValueHandle(JNIEnv *env, jlong value) { } jobject newTVMValueLong(JNIEnv *env, jlong value) { - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueLong"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueLong"); jmethodID constructor = env->GetMethodID(cls, "", "(J)V"); jobject object = env->NewObject(cls, constructor, value); env->DeleteLocalRef(cls); @@ -106,7 +106,7 @@ jobject newTVMValueLong(JNIEnv *env, jlong value) { } jobject newTVMValueDouble(JNIEnv *env, jdouble value) { - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueDouble"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueDouble"); jmethodID constructor = env->GetMethodID(cls, "", "(D)V"); jobject object = env->NewObject(cls, constructor, value); env->DeleteLocalRef(cls); @@ -115,7 +115,7 @@ jobject newTVMValueDouble(JNIEnv *env, jdouble value) { jobject newTVMValueString(JNIEnv *env, const char *value) { jstring jvalue = env->NewStringUTF(value); - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueString"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueString"); jmethodID constructor = env->GetMethodID(cls, "", "(Ljava/lang/String;)V"); jobject object = env->NewObject(cls, constructor, jvalue); env->DeleteLocalRef(cls); @@ -127,7 +127,7 @@ jobject newTVMValueBytes(JNIEnv *env, const TVMByteArray *arr) { jbyteArray jarr = env->NewByteArray(arr->size); env->SetByteArrayRegion(jarr, 0, arr->size, reinterpret_cast(const_cast(arr->data))); - jclass cls = env->FindClass("ml/dmlc/tvm/TVMValueBytes"); + jclass cls = env->FindClass("org/apache/tvm/TVMValueBytes"); jmethodID constructor = env->GetMethodID(cls, "", "([B)V"); jobject object = env->NewObject(cls, constructor, jarr); env->DeleteLocalRef(cls); @@ -136,7 +136,7 @@ jobject newTVMValueBytes(JNIEnv *env, const TVMByteArray *arr) { } jobject newModule(JNIEnv *env, jlong value) { - jclass cls = env->FindClass("ml/dmlc/tvm/Module"); + jclass cls = env->FindClass("org/apache/tvm/Module"); jmethodID constructor = env->GetMethodID(cls, "", "(J)V"); jobject object = env->NewObject(cls, constructor, value); env->DeleteLocalRef(cls); @@ -144,7 +144,7 @@ jobject newModule(JNIEnv *env, jlong value) { } jobject newFunction(JNIEnv *env, jlong value) { - jclass cls = env->FindClass("ml/dmlc/tvm/Function"); + jclass cls = env->FindClass("org/apache/tvm/Function"); jmethodID constructor = env->GetMethodID(cls, "", "(J)V"); jobject object = env->NewObject(cls, constructor, value); env->DeleteLocalRef(cls); @@ -152,7 +152,7 @@ jobject newFunction(JNIEnv *env, jlong value) { } jobject newNDArray(JNIEnv *env, jlong handle, jboolean isview) { - jclass cls = env->FindClass("ml/dmlc/tvm/NDArrayBase"); + jclass cls = env->FindClass("org/apache/tvm/NDArrayBase"); jmethodID constructor = env->GetMethodID(cls, "", "(JZ)V"); jobject object = env->NewObject(cls, constructor, handle, isview); env->DeleteLocalRef(cls); @@ -168,7 +168,7 @@ jobject newObject(JNIEnv *env, const char *clsname) { } void fromJavaDType(JNIEnv *env, jobject jdtype, TVMType *dtype) { - jclass tvmTypeClass = env->FindClass("ml/dmlc/tvm/TVMType"); + jclass tvmTypeClass = env->FindClass("org/apache/tvm/TVMType"); dtype->code = (uint8_t)(env->GetIntField(jdtype, env->GetFieldID(tvmTypeClass, "typeCode", "I"))); dtype->bits = (uint8_t)(env->GetIntField(jdtype, env->GetFieldID(tvmTypeClass, "bits", "I"))); dtype->lanes = (uint16_t)(env->GetIntField(jdtype, env->GetFieldID(tvmTypeClass, "lanes", "I"))); @@ -176,7 +176,7 @@ void fromJavaDType(JNIEnv *env, jobject jdtype, TVMType *dtype) { } void fromJavaContext(JNIEnv *env, jobject jctx, TVMContext *ctx) { - jclass tvmContextClass = env->FindClass("ml/dmlc/tvm/TVMContext"); + jclass tvmContextClass = env->FindClass("org/apache/tvm/TVMContext"); ctx->device_type = static_cast(env->GetIntField(jctx, env->GetFieldID(tvmContextClass, "deviceType", "I"))); ctx->device_id = static_cast(env->GetIntField(jctx, @@ -206,7 +206,7 @@ jobject tvmRetValueToJava(JNIEnv *env, TVMValue value, int tcode) { case kBytes: return newTVMValueBytes(env, reinterpret_cast(value.v_handle)); case kNull: - return newObject(env, "ml/dmlc/tvm/TVMValueNull"); + return newObject(env, "org/apache/tvm/TVMValueNull"); default: LOG(FATAL) << "Do NOT know how to handle return type code " << tcode; } diff --git a/jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc b/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc similarity index 86% rename from jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc rename to jvm/native/src/main/native/org_apache_tvm_native_c_api.cc index b4bfd4270775..ecc1db666e1c 100644 --- a/jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc +++ b/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc @@ -17,10 +17,10 @@ * under the License. */ /*! - * \file ml_dmlc_tvm_native_c_api.cc + * \file org_apache_tvm_native_c_api.cc * \brief tvm4j jni source file */ -#include "ml_dmlc_tvm_native_c_api.h" // generated by javah +#include "org_apache_tvm_native_c_api.h" // generated by javah #ifdef TVM4J_ANDROID #include "tvm_runtime.h" #else @@ -47,7 +47,7 @@ struct TVMFuncArgsThreadLocalEntry { }; typedef dmlc::ThreadLocalStore TVMFuncArgsThreadLocalStore; -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_nativeLibInit +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_nativeLibInit (JNIEnv *env, jobject obj, jstring jtvmLibFile) { if (_tvmHandle == NULL && !env->IsSameObject(jtvmLibFile, NULL)) { const char *tvmLibFile = env->GetStringUTFChars(jtvmLibFile, 0); @@ -61,19 +61,19 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_nativeLibInit return env->GetJavaVM(&_jvm); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_shutdown(JNIEnv *env, jobject obj) { +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_shutdown(JNIEnv *env, jobject obj) { if (_tvmHandle) { dlclose(_tvmHandle); } return 0; } -JNIEXPORT jstring JNICALL Java_ml_dmlc_tvm_LibInfo_tvmGetLastError(JNIEnv * env, jobject obj) { +JNIEXPORT jstring JNICALL Java_org_apache_tvm_LibInfo_tvmGetLastError(JNIEnv * env, jobject obj) { return env->NewStringUTF(TVMGetLastError()); } // Function -JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgLong( +JNIEXPORT void JNICALL Java_org_apache_tvm_LibInfo_tvmFuncPushArgLong( JNIEnv *env, jobject obj, jlong arg) { TVMValue value; value.v_int64 = static_cast(arg); @@ -82,7 +82,7 @@ JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgLong( e->tvmFuncArgTypes.push_back(kDLInt); } -JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgDouble( +JNIEXPORT void JNICALL Java_org_apache_tvm_LibInfo_tvmFuncPushArgDouble( JNIEnv *env, jobject obj, jdouble arg) { TVMValue value; value.v_float64 = static_cast(arg); @@ -91,7 +91,7 @@ JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgDouble( e->tvmFuncArgTypes.push_back(kDLFloat); } -JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgString( +JNIEXPORT void JNICALL Java_org_apache_tvm_LibInfo_tvmFuncPushArgString( JNIEnv *env, jobject obj, jstring arg) { TVMValue value; jstring garg = reinterpret_cast(env->NewGlobalRef(arg)); @@ -103,7 +103,7 @@ JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgString( e->tvmFuncArgPushedStrs.push_back(std::make_pair(garg, value.v_str)); } -JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgHandle( +JNIEXPORT void JNICALL Java_org_apache_tvm_LibInfo_tvmFuncPushArgHandle( JNIEnv *env, jobject obj, jlong arg, jint argType) { TVMValue value; value.v_handle = reinterpret_cast(arg); @@ -112,7 +112,7 @@ JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgHandle( e->tvmFuncArgTypes.push_back(static_cast(argType)); } -JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgBytes( +JNIEXPORT void JNICALL Java_org_apache_tvm_LibInfo_tvmFuncPushArgBytes( JNIEnv *env, jobject obj, jbyteArray arg) { jbyteArray garg = reinterpret_cast(env->NewGlobalRef(arg)); jbyte *data = env->GetByteArrayElements(garg, 0); @@ -132,7 +132,7 @@ JNIEXPORT void JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncPushArgBytes( // release (garg, data), byteArray later } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncListGlobalNames( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncListGlobalNames( JNIEnv *env, jobject obj, jobject jfuncNames) { int outSize; const char **outArray; @@ -157,12 +157,12 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncListGlobalNames( return ret; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncFree( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncFree( JNIEnv *env, jobject obj, jlong jhandle) { return TVMFuncFree(reinterpret_cast(jhandle)); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncGetGlobal( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncGetGlobal( JNIEnv *env, jobject obj, jstring jname, jobject jhandle) { TVMFunctionHandle handle; const char *name = env->GetStringUTFChars(jname, 0); @@ -172,7 +172,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncGetGlobal( return ret; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCall( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncCall( JNIEnv *env, jobject obj, jlong jhandle, jobject jretVal) { TVMFuncArgsThreadLocalEntry *e = TVMFuncArgsThreadLocalStore::Get(); int numArgs = e->tvmFuncArgValues.size(); @@ -211,9 +211,9 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCall( } // return TVMValue object to Java - jclass refTVMValueCls = env->FindClass("ml/dmlc/tvm/Base$RefTVMValue"); + jclass refTVMValueCls = env->FindClass("org/apache/tvm/Base$RefTVMValue"); jfieldID refTVMValueFid - = env->GetFieldID(refTVMValueCls, "value", "Lml/dmlc/tvm/TVMValue;"); + = env->GetFieldID(refTVMValueCls, "value", "Lorg/apache/tvm/TVMValue;"); env->SetObjectField(jretVal, refTVMValueFid, tvmRetValueToJava(env, retVal, retTypeCode)); @@ -237,7 +237,7 @@ extern "C" int funcInvokeCallback(TVMValue *args, CHECK(jniStatus == JNI_OK); } - jclass tvmValueCls = env->FindClass("ml/dmlc/tvm/TVMValue"); + jclass tvmValueCls = env->FindClass("org/apache/tvm/TVMValue"); jobjectArray jargs = env->NewObjectArray(numArgs, tvmValueCls, 0); for (int i = 0; i < numArgs; ++i) { TVMValue arg = args[i]; @@ -249,9 +249,9 @@ extern "C" int funcInvokeCallback(TVMValue *args, env->SetObjectArrayElement(jargs, i, jarg); } - jclass clsFunc = env->FindClass("ml/dmlc/tvm/Function"); + jclass clsFunc = env->FindClass("org/apache/tvm/Function"); jmethodID invokeRegisteredCbFunc = env->GetStaticMethodID(clsFunc, "invokeRegisteredCbFunc", - "(Lml/dmlc/tvm/Function$Callback;[Lml/dmlc/tvm/TVMValue;)Ljava/lang/Object;"); + "(Lorg/apache/tvm/Function$Callback;[Lorg/apache/tvm/TVMValue;)Ljava/lang/Object;"); jmethodID pushArgToStack = env->GetStaticMethodID(clsFunc, "pushArgToStack", "(Ljava/lang/Object;)V"); @@ -313,7 +313,7 @@ extern "C" void funcFreeCallback(void *resourceHandle) { env->DeleteGlobalRef(reinterpret_cast(resourceHandle)); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCreateFromCFunc( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncCreateFromCFunc( JNIEnv *env, jobject obj, jobject jfunction, jobject jretHandle) { TVMFunctionHandle out; int ret = TVMFuncCreateFromCFunc(reinterpret_cast(&funcInvokeCallback), @@ -324,7 +324,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCreateFromCFunc( return ret; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncRegisterGlobal( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmFuncRegisterGlobal( JNIEnv *env, jobject obj, jstring jname, jlong jhandle, jint joverride) { const char *name = env->GetStringUTFChars(jname, 0); int ret = TVMFuncRegisterGlobal( @@ -334,18 +334,18 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncRegisterGlobal( } // Module -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmModFree( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmModFree( JNIEnv *env, jobject obj, jlong jhandle) { return TVMModFree(reinterpret_cast(jhandle)); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmModImport( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmModImport( JNIEnv *env, jobject obj, jlong jmod, jlong jdep) { return TVMModImport(reinterpret_cast(jmod), reinterpret_cast(jdep)); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmModGetFunction( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmModGetFunction( JNIEnv *env, jobject obj, jlong jhandle, jstring jname, jint jimport, jobject jret) { TVMFunctionHandle retFunc; @@ -362,12 +362,12 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmModGetFunction( } // NDArray -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayFree( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayFree( JNIEnv *env, jobject obj, jlong jhandle) { return TVMArrayFree(reinterpret_cast(jhandle)); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayAlloc( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayAlloc( JNIEnv *env, jobject obj, jlongArray jshape, jint jdtypeCode, jint jdtypeBits, jint jdtypeLanes, jint jdeviceType, jint jdeviceId, jobject jret) { int ndim = static_cast(env->GetArrayLength(jshape)); @@ -391,7 +391,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayAlloc( return ret; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayGetShape( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayGetShape( JNIEnv *env, jobject obj, jlong jhandle, jobject jshape) { TVMArray *array = reinterpret_cast(jhandle); int64_t *shape = array->shape; @@ -414,13 +414,13 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayGetShape( return 0; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayCopyFromTo( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayCopyFromTo( JNIEnv *env, jobject obj, jlong jfrom, jlong jto) { return TVMArrayCopyFromTo(reinterpret_cast(jfrom), reinterpret_cast(jto), NULL); } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayCopyFromJArray( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayCopyFromJArray( JNIEnv *env, jobject obj, jbyteArray jarr, jlong jfrom, jlong jto) { jbyte *data = env->GetByteArrayElements(jarr, NULL); @@ -436,7 +436,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayCopyFromJArray( return ret; } -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayCopyToJArray( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmArrayCopyToJArray( JNIEnv *env, jobject obj, jlong jfrom, jbyteArray jarr) { TVMArray *from = reinterpret_cast(jfrom); int size = static_cast(env->GetArrayLength(jarr)); @@ -450,7 +450,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayCopyToJArray( } // Context -JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmSynchronize( +JNIEXPORT jint JNICALL Java_org_apache_tvm_LibInfo_tvmSynchronize( JNIEnv *env, jint deviceType, jint deviceId) { return TVMSynchronize(static_cast(deviceType), static_cast(deviceId), NULL); } diff --git a/jvm/pom.xml b/jvm/pom.xml index 797acf58f6db..5205abfafdba 100644 --- a/jvm/pom.xml +++ b/jvm/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml.dmlc.tvm + org.apache.tvm tvm4j-parent 0.0.1-SNAPSHOT TVM4J Package - Parent