2019-06-06 14:21:15 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
~ 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"
|
2020-05-29 10:01:02 +02:00
|
|
|
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>
|
2019-06-06 14:21:15 +02:00
|
|
|
|
|
|
|
<parent>
|
|
|
|
<groupId>org.deeplearning4j</groupId>
|
|
|
|
<artifactId>deeplearning4j</artifactId>
|
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
|
</parent>
|
|
|
|
|
|
|
|
<groupId>org.nd4j</groupId>
|
|
|
|
<artifactId>libnd4j</artifactId>
|
|
|
|
<packaging>pom</packaging>
|
|
|
|
|
|
|
|
<name>libnd4j</name>
|
|
|
|
<description>The C++ engine that powers the scientific computing library ND4J - n-dimensional
|
|
|
|
arrays for Java
|
|
|
|
</description>
|
|
|
|
<url>http://nd4j.org/</url>
|
|
|
|
|
|
|
|
<developers>
|
|
|
|
<developer>
|
|
|
|
<id>agibsonccc</id>
|
|
|
|
<name>Adam Gibson</name>
|
|
|
|
<email>adam@skymind.io</email>
|
|
|
|
</developer>
|
|
|
|
<developer>
|
|
|
|
<id>raver119</id>
|
|
|
|
<name>raver119</name>
|
|
|
|
</developer>
|
|
|
|
<developer>
|
|
|
|
<id>saudet</id>
|
|
|
|
<name>Samuel Audet</name>
|
|
|
|
</developer>
|
|
|
|
</developers>
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
<!-- CUDA version is linked with the artifact name so cannot move to parent pom.xml -->
|
2020-07-26 14:59:27 +02:00
|
|
|
<cuda.version>11.0</cuda.version>
|
|
|
|
<cudnn.version>8.0</cudnn.version>
|
2019-06-06 14:21:15 +02:00
|
|
|
<libnd4j.build>release</libnd4j.build>
|
|
|
|
<libnd4j.chip>cpu</libnd4j.chip>
|
|
|
|
<libnd4j.platform>${javacpp.platform}</libnd4j.platform>
|
|
|
|
<libnd4j.extension></libnd4j.extension>
|
|
|
|
<libnd4j.cuda></libnd4j.cuda>
|
|
|
|
<libnd4j.compute></libnd4j.compute>
|
|
|
|
<libnd4j.classifier>${libnd4j.platform}</libnd4j.classifier>
|
2019-07-02 11:23:22 +02:00
|
|
|
<libnd4j.buildthreads></libnd4j.buildthreads>
|
2019-09-11 20:50:28 +02:00
|
|
|
<libnd4j.helper></libnd4j.helper>
|
2020-03-19 06:53:21 +01:00
|
|
|
<libnd4j.buildprogram>bash</libnd4j.buildprogram>
|
2019-06-06 14:21:15 +02:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<extensions>
|
|
|
|
<extension>
|
|
|
|
<groupId>org.kuali.maven.wagons</groupId>
|
|
|
|
<artifactId>maven-s3-wagon</artifactId>
|
|
|
|
<version>1.2.1</version>
|
|
|
|
</extension>
|
|
|
|
</extensions>
|
|
|
|
|
|
|
|
<plugins>
|
2019-07-02 11:23:22 +02:00
|
|
|
<!-- Infer the number of CPU cores and put it in the cpu.core.count property -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
|
|
<version>${maven-build-helper-plugin.version}</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>get-cpu-count</id>
|
|
|
|
<goals>
|
|
|
|
<goal>cpu-count</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<cpuCount>cpu.core.count</cpuCount>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2019-06-06 14:21:15 +02:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
<version>${javacpp.version}</version>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>openblas-platform</artifactId>
|
|
|
|
<version>${openblas.version}-${javacpp-presets.version}</version>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<configuration>
|
|
|
|
<properties>${libnd4j.platform}</properties>
|
|
|
|
<buildResources>
|
|
|
|
<buildResource>/${javacpp.platform.library.path}/</buildResource>
|
|
|
|
<buildResource>/org/bytedeco/openblas/${libnd4j.platform}/</buildResource>
|
|
|
|
</buildResources>
|
|
|
|
<includeResources>
|
2020-05-29 10:01:02 +02:00
|
|
|
<includeResource>/${javacpp.platform.library.path}/include/
|
|
|
|
</includeResource>
|
|
|
|
<includeResource>/org/bytedeco/openblas/${libnd4j.platform}/include/
|
|
|
|
</includeResource>
|
2019-06-06 14:21:15 +02:00
|
|
|
</includeResources>
|
|
|
|
<linkResources>
|
|
|
|
<linkResource>/${javacpp.platform.library.path}/</linkResource>
|
|
|
|
<linkResource>/${javacpp.platform.library.path}/lib/</linkResource>
|
|
|
|
<linkResource>/org/bytedeco/openblas/${libnd4j.platform}/</linkResource>
|
|
|
|
<linkResource>/org/bytedeco/openblas/${libnd4j.platform}/lib/</linkResource>
|
|
|
|
</linkResources>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-cppbuild-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-cppbuild-compile</id>
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${libnd4j.cpu.compile.skip}</skip>
|
|
|
|
<buildCommand>
|
2020-03-19 06:53:21 +01:00
|
|
|
<program>${libnd4j.buildprogram}</program>
|
|
|
|
<argument>buildnativeoperations.sh</argument>
|
2019-06-06 14:21:15 +02:00
|
|
|
<argument>--build-type</argument>
|
|
|
|
<argument>${libnd4j.build}</argument>
|
|
|
|
<argument>--chip</argument>
|
|
|
|
<argument>${libnd4j.chip}</argument>
|
|
|
|
<argument>--platform</argument>
|
|
|
|
<argument>${libnd4j.platform}</argument>
|
|
|
|
<argument>--chip-extension</argument>
|
|
|
|
<argument>${libnd4j.extension}</argument>
|
|
|
|
<argument>--chip-version</argument>
|
|
|
|
<argument>${cuda.version}</argument>
|
|
|
|
<argument>--compute</argument>
|
|
|
|
<argument>${libnd4j.compute}</argument>
|
|
|
|
<argument>${libnd4j.tests}</argument>
|
2019-07-02 11:23:22 +02:00
|
|
|
<argument>-j</argument>
|
|
|
|
<argument>${libnd4j.buildthreads}</argument>
|
2019-09-11 20:50:28 +02:00
|
|
|
<argument>-h</argument>
|
|
|
|
<argument>${libnd4j.helper}</argument>
|
2019-06-06 14:21:15 +02:00
|
|
|
</buildCommand>
|
|
|
|
<workingDirectory>${project.basedir}</workingDirectory>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>libnd4j-test-run</id>
|
|
|
|
<phase>test</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${libnd4j.test.skip}</skip>
|
|
|
|
<workingDirectory>${basedir}/tests_cpu</workingDirectory>
|
|
|
|
<buildCommand>
|
2020-03-24 02:55:47 +01:00
|
|
|
<program>bash</program>
|
2019-06-06 14:21:15 +02:00
|
|
|
<argument>run_tests.sh</argument>
|
2019-11-13 15:15:18 +01:00
|
|
|
<argument>--chip</argument>
|
|
|
|
<argument>${libnd4j.chip}</argument>
|
2019-06-06 14:21:15 +02:00
|
|
|
</buildCommand>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
|
|
<version>2.6</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-cppbuild-clean</id>
|
|
|
|
<phase>clean</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>clean</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<filesets>
|
|
|
|
<fileset>
|
|
|
|
<directory>blasbuild</directory>
|
|
|
|
</fileset>
|
|
|
|
</filesets>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
|
|
<version>3.0.0</version>
|
|
|
|
<configuration>
|
|
|
|
<descriptors>
|
|
|
|
<descriptor>assembly.xml</descriptor>
|
|
|
|
</descriptors>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>single</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
|
|
|
<profiles>
|
2020-03-19 06:53:21 +01:00
|
|
|
<!-- Build on windows can use sh rather than bash due to WSL clashing with msys2 -->
|
|
|
|
<profile>
|
|
|
|
<id>build-windows</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>Windows</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.buildprogram>sh</libnd4j.buildprogram>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<!-- Default build program should be bash on non windows platforms -->
|
|
|
|
<profile>
|
|
|
|
<id>build-unix</id>
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>true</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.buildprogram>bash</libnd4j.buildprogram>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
2019-07-02 11:23:22 +02:00
|
|
|
<!-- Use -Dlibnd4j.singlethread to use single threaded build (multi-threaded by default) -->
|
|
|
|
<profile>
|
2020-03-19 06:53:21 +01:00
|
|
|
<id>libnd4j-single-thread</id>
|
2019-07-02 11:23:22 +02:00
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.singlethread</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.buildthreads>1</libnd4j.buildthreads>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>libnd4-multi-thread</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>!libnd4j.singlethread</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<!-- Note: CPU core count is from build helper plugin -->
|
|
|
|
<libnd4j.buildthreads>${cpu.core.count}</libnd4j.buildthreads>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
2019-06-06 14:21:15 +02:00
|
|
|
<profile>
|
|
|
|
<id>chip</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.chip</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
2020-05-29 10:01:02 +02:00
|
|
|
<libnd4j.classifier>${libnd4j.platform}-${libnd4j.chip}-${cuda.version}
|
|
|
|
</libnd4j.classifier>
|
2019-06-06 14:21:15 +02:00
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>extension</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.extension</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.classifier>${libnd4j.platform}-${libnd4j.extension}</libnd4j.classifier>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>cuda</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.cuda</name>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<!-- Leave libnd4j.chip and libnd4j.classifier as is to build CPU version as well. -->
|
|
|
|
<!-- <libnd4j.chip>cuda</libnd4j.chip> -->
|
|
|
|
<!-- <libnd4j.classifier>${libnd4j.platform}-cuda-${cuda.version}</libnd4j.classifier> -->
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
<version>${javacpp.version}</version>
|
|
|
|
<configuration>
|
|
|
|
<properties>${libnd4j.platform}</properties>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>javacpp-cppbuild-compile-cuda</id>
|
|
|
|
<phase>compile</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<skip>${libnd4j.cuda.compile.skip}</skip>
|
|
|
|
<buildCommand>
|
2020-03-19 06:53:21 +01:00
|
|
|
<program>${libnd4j.buildprogram}</program>
|
|
|
|
<argument>buildnativeoperations.sh
|
2019-06-06 14:21:15 +02:00
|
|
|
</argument>
|
|
|
|
<argument>--build-type</argument>
|
|
|
|
<argument>${libnd4j.build}</argument>
|
|
|
|
<argument>--chip</argument>
|
|
|
|
<argument>cuda</argument>
|
|
|
|
<argument>--platform</argument>
|
|
|
|
<argument>${libnd4j.platform}</argument>
|
|
|
|
<argument>--chip-extension</argument>
|
|
|
|
<argument>${libnd4j.extension}</argument>
|
|
|
|
<argument>--chip-version</argument>
|
|
|
|
<argument>${cuda.version}</argument>
|
|
|
|
<argument>--compute</argument>
|
|
|
|
<argument>${libnd4j.compute}</argument>
|
|
|
|
<argument>${libnd4j.tests}</argument>
|
2020-01-04 03:45:07 +01:00
|
|
|
<argument>-j</argument>
|
|
|
|
<argument>${libnd4j.buildthreads}</argument>
|
2019-06-06 14:21:15 +02:00
|
|
|
</buildCommand>
|
|
|
|
<workingDirectory>${project.basedir}</workingDirectory>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
|
|
<version>3.0.0</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>libnd4j-package-cuda</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>single</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<descriptors>
|
|
|
|
<descriptor>assembly-cuda.xml</descriptor>
|
|
|
|
</descriptors>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>clean-tests</id>
|
|
|
|
<activation>
|
|
|
|
<file>
|
|
|
|
<exists>${basedir}/tests_cpu/Makefile</exists>
|
|
|
|
</file>
|
|
|
|
</activation>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
|
|
<version>1.6.0</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>libnd4j-test-clean</id>
|
|
|
|
<phase>clean</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>exec</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<executable>make</executable>
|
|
|
|
<workingDirectory>${basedir}/tests_cpu</workingDirectory>
|
|
|
|
<arguments>
|
|
|
|
<argument>clean</argument>
|
|
|
|
</arguments>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
2019-09-11 20:50:28 +02:00
|
|
|
<!-- Profiles to set the default libnd4j.helper property, example: mkdnn -->
|
|
|
|
<profile>
|
|
|
|
<id>libnd4j-helper-avx2</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.extension</name>
|
|
|
|
<value>avx2</value>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.helper>mkldnn</libnd4j.helper>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>libnd4j-helper-avx512</id>
|
|
|
|
<activation>
|
|
|
|
<property>
|
|
|
|
<name>libnd4j.extension</name>
|
|
|
|
<value>avx512</value>
|
|
|
|
</property>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<libnd4j.helper>mkldnn</libnd4j.helper>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
2019-06-06 14:21:15 +02:00
|
|
|
</profiles>
|
|
|
|
</project>
|