2019-06-06 14:21:15 +02:00
|
|
|
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
~ Copyright (c) 2015-2018 Skymind, Inc.
|
|
|
|
~
|
|
|
|
~ This program and the accompanying materials are made available under the
|
|
|
|
~ terms of the Apache License, Version 2.0 which is available at
|
|
|
|
~ https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
~
|
|
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
|
|
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
~ License for the specific language governing permissions and limitations
|
|
|
|
~ under the License.
|
|
|
|
~
|
|
|
|
~ SPDX-License-Identifier: Apache-2.0
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
|
|
|
|
|
|
|
<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">
|
|
|
|
<parent>
|
|
|
|
<artifactId>nd4j-backend-impls</artifactId>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
|
|
<artifactId>nd4j-native</artifactId>
|
|
|
|
<name>nd4j-native</name>
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${dependency.groupId}</groupId>
|
|
|
|
<artifactId>${dependency.artifactId}</artifactId>
|
|
|
|
<version>${dependency.version}</version>
|
|
|
|
<type>${dependency.packaging}</type>
|
|
|
|
<classifier>${dependency.classifier}</classifier>
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
<version>${javacpp.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
<version>${openblas.version}-${javacpp-presets.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
<version>${openblas.version}-${javacpp-presets.version}</version>
|
|
|
|
<classifier>${dependency.platform}</classifier>
|
|
|
|
</dependency>
|
2020-03-04 09:11:01 +01:00
|
|
|
|
2019-06-06 14:21:15 +02:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>nd4j-native-api</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>nd4j-api</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-parser</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>compile</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skipMain>${javacpp.parser.skip}</skipMain>
|
|
|
|
<includes>
|
|
|
|
<include>org/nd4j/nativeblas/Nd4jCpuPresets.java</include>
|
|
|
|
</includes>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
<version>${javacpp.version}</version>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>nd4j-native-api</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
<version>${openblas.version}-${javacpp-presets.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
<version>${openblas.version}-${javacpp-presets.version}</version>
|
|
|
|
<classifier>${dependency.platform}</classifier>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<configuration>
|
|
|
|
<properties>${javacpp.platform.properties}</properties>
|
|
|
|
<propertyKeysAndValues>
|
|
|
|
<property>
|
|
|
|
<name>platform.root</name>
|
|
|
|
<value>${javacpp.platform.root}</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>platform.compiler</name>
|
|
|
|
<value>${javacpp.platform.compiler}</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>platform.sysroot</name>
|
|
|
|
<value>${javacpp.platform.sysroot}</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>platform.extension</name>
|
|
|
|
<value>${javacpp.platform.extension}</value>
|
|
|
|
</property>
|
|
|
|
</propertyKeysAndValues>
|
|
|
|
<classPaths>
|
|
|
|
<classPath>${project.build.outputDirectory}</classPath>
|
|
|
|
</classPaths>
|
|
|
|
<includePaths>
|
|
|
|
<includePath>${libnd4jhome}/blasbuild/cpu/include</includePath>
|
|
|
|
<includePath>${libnd4jhome}/blasbuild/cpu/flatbuffers-src/include/</includePath>
|
|
|
|
<includePath>${libnd4jhome}/blas</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/helpers</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/array</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/cnpy</includePath>
|
2019-08-21 06:32:21 +02:00
|
|
|
<includePath>${libnd4jhome}/include/execution</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/exceptions</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/graph</includePath>
|
2019-06-06 14:21:15 +02:00
|
|
|
<includePath>${libnd4jhome}/include/indexing</includePath>
|
2019-08-21 06:32:21 +02:00
|
|
|
<includePath>${libnd4jhome}/include/memory</includePath>
|
|
|
|
<includePath>${libnd4jhome}/include/performance</includePath>
|
2019-06-06 14:21:15 +02:00
|
|
|
</includePaths>
|
|
|
|
<linkPath>${libnd4jhome}/blasbuild/cpu/blas</linkPath>
|
|
|
|
<buildResources>
|
|
|
|
<buildResource>/${javacpp.platform.library.path}/</buildResource>
|
|
|
|
<buildResource>/org/bytedeco/openblas/${javacpp.platform}/</buildResource>
|
|
|
|
</buildResources>
|
|
|
|
<includeResources>
|
|
|
|
<includeResource>/${javacpp.platform.library.path}/include/</includeResource>
|
|
|
|
<includeResource>/org/bytedeco/openblas/${javacpp.platform}/include/</includeResource>
|
|
|
|
</includeResources>
|
|
|
|
<linkResources>
|
|
|
|
<linkResource>/${javacpp.platform.library.path}/</linkResource>
|
|
|
|
<linkResource>/${javacpp.platform.library.path}/lib/</linkResource>
|
2020-03-21 09:30:26 +01:00
|
|
|
<linkResource>/org/bytedeco/openblas/${javacpp.platform}/</linkResource>
|
|
|
|
<linkResource>/org/bytedeco/openblas/${javacpp.platform}/lib/</linkResource>
|
2019-06-06 14:21:15 +02:00
|
|
|
</linkResources>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-validate</id>
|
|
|
|
<phase>validate</phase>
|
|
|
|
<goals>
|
2020-03-19 06:53:21 +01:00
|
|
|
<goal>build</goal>
|
2019-06-06 14:21:15 +02:00
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-parser</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${javacpp.parser.skip}</skip>
|
|
|
|
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
|
|
|
|
<classOrPackageName>org.nd4j.nativeblas.Nd4jCpuPresets</classOrPackageName>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-compiler</id>
|
|
|
|
<phase>process-classes</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${javacpp.compiler.skip}</skip>
|
|
|
|
<classOrPackageName>org.nd4j.nativeblas.Nd4jCpu</classOrPackageName>
|
|
|
|
<copyLibs>true</copyLibs>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>libnd4j-checks</id>
|
|
|
|
<goals>
|
|
|
|
<goal>enforce</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<rules>
|
|
|
|
<requireProperty>
|
|
|
|
<property>libnd4jhome</property>
|
|
|
|
<message>You must set the LIBND4J_HOME environment variable!</message>
|
|
|
|
<regex>.*/.*</regex>
|
|
|
|
<regexMessage>!!! LIBND4J_HOME must be a valid unix path!</regexMessage>
|
|
|
|
</requireProperty>
|
|
|
|
<requireFilesExist>
|
|
|
|
<files>
|
2020-03-02 10:49:41 +01:00
|
|
|
<file>${libnd4jhome}/include/legacy/NativeOps.h</file>
|
2019-06-06 14:21:15 +02:00
|
|
|
<file>${libnd4jhome}/blasbuild/cpu/blas</file>
|
|
|
|
</files>
|
|
|
|
<message>!!! You have to compile libnd4j with cpu support first!</message>
|
|
|
|
</requireFilesExist>
|
|
|
|
</rules>
|
|
|
|
<fail>true</fail>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<source>8</source>
|
|
|
|
<target>8</target>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
|
|
|
<profiles>
|
2020-03-04 09:11:01 +01:00
|
|
|
<profile>
|
|
|
|
<id>mkl</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>os.arch</name>
|
|
|
|
<value>x86_64</value>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>mkl</artifactId>
|
|
|
|
<version>${mkl.version}-${javacpp-presets.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>mkl</artifactId>
|
|
|
|
<version>${mkl.version}-${javacpp-presets.version}</version>
|
|
|
|
<classifier>${dependency.platform2}</classifier>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</profile>
|
2019-06-06 14:21:15 +02:00
|
|
|
<profile>
|
|
|
|
<id>testresources</id>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>avx2</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.extension</name>
|
|
|
|
<value>avx2</value>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<javacpp.platform.extension>-avx2</javacpp.platform.extension>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>avx512</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.extension</name>
|
|
|
|
<value>avx512</value>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<javacpp.platform.extension>-avx512</javacpp.platform.extension>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
2020-03-20 04:14:03 +01:00
|
|
|
<profile>
|
|
|
|
<id>mingw</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>windows</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<properties>${javacpp.platform}-mingw</properties>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
2019-06-06 14:21:15 +02:00
|
|
|
|
|
|
|
<profile>
|
|
|
|
<id>libnd4j-assembly</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j-assembly</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4jhome>${project.build.directory}/libnd4j/</libnd4jhome>
|
|
|
|
</properties>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>libnd4j</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<type>zip</type>
|
|
|
|
<classifier>${javacpp.platform}${javacpp.platform.extension}</classifier>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>libnd4j-checks</id>
|
|
|
|
<goals>
|
|
|
|
<goal>enforce</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>true</skip>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
|
<version>3.0.2</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>unpack</id>
|
|
|
|
<phase>initialize</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>unpack</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactItems>
|
|
|
|
<artifactItem>
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>libnd4j</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<type>zip</type>
|
|
|
|
<classifier>${javacpp.platform}${javacpp.platform.extension}</classifier>
|
|
|
|
<overWrite>true</overWrite>
|
|
|
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
|
|
|
</artifactItem>
|
|
|
|
</artifactItems>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
</project>
|