forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP][Frontend] Scala/Java package (apache#176)
* JVM package skeleton * [JVM] link libtvm.so and list function names * [JVM] Function & NDArray skeleton * [JVM] TVMFuncCall in JNI * [JVM] handle string arg in TVMFuncCall * [JVM] get module function * [JVM] entry function for Module * [JVM] construct Module from function return value * [JVM] TVMContext, TVMArray attributes * [JVM] NDArray from / to java array * [JVM] load so and compute on cpu * [JVM] move PackedFunc to individual modules * [JVM] assembly package & native library loader * [JVM] unit test & codestyle check settings * [JVM] NDArray from & to different dtypes * [JVM] NDArray from native double array. Add linux-cpu profile. * [JVM] modify Makefile * [JVM] add linux-x86_64-gpu profile * [tvm4j] delay load libtvm_runtime.so * [tvm4j] refactor to pure java * [tvm4j] remove scalastyle-config.xml * [tvm4j] remove link HalideIR, remove Shape, remove scala binary versions * [tvm4j] only allow convert from/to same type array * [tvm4j] make NDArray api more readable * [tvm4j] refactor for c api * [tvm4j] add Jenkins tests * [tvm4j] fix duplicate Dockerfile cmd * [tvm4j] fix ut script filename * [tvm4j] add module load tests * [tvm4j] add javadoc, remove types package * [tvm4j] fix test script * [tvm4j] remove ut temp dir * [tvm4j] fix missing package types * [tvm4j] java code style check * [tvm4j] fix java lint * [tvm4j] downgrade checkstyle plugin for JDK7 * [tvm4j] add stylecheck in jenkins tests * [tvm4j] specify source file encoding * [tvm4j] lazy init function; add Function.call() api; allow manully release Module,NDArray,Function * [tvm4j] fix ModFree * [tvm4j] cache Function in API
- Loading branch information
Showing
43 changed files
with
3,757 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-linux-x86_64-cpu</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>TVM4J Package - Full Linux-x86_64 CPU-only</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>libtvm4j-linux-x86_64-cpu</artifactId> | ||
<version>${project.version}</version> | ||
<type>so</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
jvm/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<assembly> | ||
<id>full</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<files> | ||
<file> | ||
<source>../../../lib/libtvm_runtime.so</source> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<fileMode>0644</fileMode> | ||
</file> | ||
</files> | ||
<dependencySets> | ||
<dependencySet> | ||
<includes> | ||
<include>*:*:jar</include> | ||
</includes> | ||
<outputDirectory>/</outputDirectory> | ||
<useProjectArtifact>true</useProjectArtifact> | ||
<unpack>true</unpack> | ||
<scope>runtime</scope> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<outputFileNameMapping>libtvm4j.so</outputFileNameMapping> | ||
<unpack>false</unpack> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<useStrictFiltering>false</useStrictFiltering> | ||
<includes> | ||
<include>ml.dmlc.tvm:libtvm4j-linux-x86_64-cpu:so</include> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-linux-x86_64-gpu</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>TVM4J Package - Full Linux-x86_64 GPU</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>libtvm4j-linux-x86_64-gpu</artifactId> | ||
<version>${project.version}</version> | ||
<type>so</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
jvm/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<assembly> | ||
<id>full</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<files> | ||
<file> | ||
<source>../../../lib/libtvm_runtime.so</source> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<fileMode>0644</fileMode> | ||
</file> | ||
</files> | ||
<dependencySets> | ||
<dependencySet> | ||
<includes> | ||
<include>*:*:jar</include> | ||
</includes> | ||
<outputDirectory>/</outputDirectory> | ||
<useProjectArtifact>true</useProjectArtifact> | ||
<unpack>true</unpack> | ||
<scope>runtime</scope> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<outputFileNameMapping>libtvm4j.so</outputFileNameMapping> | ||
<unpack>false</unpack> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<useStrictFiltering>false</useStrictFiltering> | ||
<includes> | ||
<include>ml.dmlc.tvm:libtvm4j-linux-x86_64-gpu:so</include> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-full-osx-x86_64-cpu</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>TVM4J Package - Full OSX-x86_64 CPU-only</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>tvm4j-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ml.dmlc.tvm</groupId> | ||
<artifactId>libtvm4j-osx-x86_64-cpu</artifactId> | ||
<version>${project.version}</version> | ||
<type>jnilib</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
jvm/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<assembly> | ||
<id>full</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<files> | ||
<file> | ||
<source>../../../lib/libtvm_runtime.so</source> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<fileMode>0644</fileMode> | ||
</file> | ||
</files> | ||
<dependencySets> | ||
<dependencySet> | ||
<includes> | ||
<include>*:*:jar</include> | ||
</includes> | ||
<outputDirectory>/</outputDirectory> | ||
<useProjectArtifact>true</useProjectArtifact> | ||
<unpack>true</unpack> | ||
<scope>runtime</scope> | ||
</dependencySet> | ||
<dependencySet> | ||
<outputDirectory>lib/native</outputDirectory> | ||
<outputFileNameMapping>libtvm4j.jnilib</outputFileNameMapping> | ||
<unpack>false</unpack> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<useStrictFiltering>false</useStrictFiltering> | ||
<includes> | ||
<include>ml.dmlc.tvm:libtvm4j-osx-x86_64-cpu:jnilib</include> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
Oops, something went wrong.