Merge pull request #9211 from eclipse/ag_quick_tests

Update surefire plugin java library loading paths
master
Adam Gibson 2021-03-06 20:08:16 +09:00 committed by GitHub
commit 4927a762eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 3102 additions and 43 deletions

View File

@ -159,7 +159,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>-Ddtype=float -Dfile.encoding=UTF-8</argLine>
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
<!--
By default: Surefire will set the classpath based on the manifest. Because tests are not included
in the JAR, any tests that rely on class path scanning for resources in the tests directory will not

3015
libnd4j/test-results.txt Normal file

File diff suppressed because one or more lines are too long

View File

@ -56,12 +56,8 @@ if [ -n "$BUILD_PATH" ]; then
export PATH="$PATH:$BUILD_PATH"
fi
unameOut="$(uname -s)"
if [[ "$unameOut" == *"MINGW"* ]]; then
../blasbuild/${CHIP}/tests_cpu/layers_tests/runtests.exe
else
../blasbuild/${CHIP}/tests_cpu/layers_tests/runtests
fi
unameOut="$(uname)"
echo "$OSTYPE"
../blasbuild/${CHIP}/tests_cpu/layers_tests/runtests.exe
# Workaround to fix posix path conversion problem on Windows (http://mingw.org/wiki/Posix_path_conversion)
[ -f "${GTEST_OUTPUT#*:}" ] && cp -a surefire-reports/ ../target && rm -rf surefire-reports/
#[ -f "${GTEST_OUTPUT#*:}" ] && cp -a surefire-reports/ ../target && rm -rf surefire-reports/

View File

@ -6710,22 +6710,25 @@ public native @Cast("char*") String buildInfo();
// Parsed from graph/Context.h
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
* Copyright (c) 2019-2020 Konduit K.K.
*
* 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
******************************************************************************/
/*
* ******************************************************************************
* *
* *
* * 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.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * 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
* *****************************************************************************
*/
//
// @author raver119@gmail.com
@ -6950,10 +6953,15 @@ public native @Cast("char*") String buildInfo();
* Copyright (c) 2015-2018 Skymind, Inc.
* Copyright (c) 2019-2020 Konduit K.K.
*
/* ******************************************************************************
*
*
* 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.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* 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
@ -23121,15 +23129,15 @@ public static final double TAD_THRESHOLD = TAD_THRESHOLD();
// #endif
/**
* compare_and_bitpack - compare with greater and pack result with uint8
* compare_and_bitpack - Compare values of input to threshold and pack resulting bits into a uint8
*
* input params:
* 0 - NDArray (input)
* 1 - 0D Tensor - threshold
* 0 - NDArray (input). Note: last dimension should be divisibly by 8
* 1 - 0D Tensor - threshold to compare against. Note: when input is bool type, the threshold is ignored
*
*
* output:
* 0 - NDArray with the same shape as input and type uint8
* 0 - NDArray with the shape as {input.dim0,...input.dimLast/8} and type uint8
*/
// #if NOT_EXCLUDED(OP_compare_and_bitpack)
@Namespace("sd::ops") public static class compare_and_bitpack extends DeclarableCustomOp {

View File

@ -81,6 +81,7 @@
<build>
<plugins>
<!-- Skip execution of Javadoc since some versions run out of memory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -140,7 +141,7 @@
Maximum heap size was set to 8g, as a minimum required value for tests run.
Depending on a build machine, default value is not always enough.
-->
<argLine>-Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g</argLine>
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
</configuration>
</plugin>
<plugin>
@ -214,6 +215,8 @@
<module>nd4j-native-preset</module>
<module>nd4j-native-platform</module>
</modules>
</profile>
<profile>
<id>cuda</id>
@ -228,6 +231,7 @@
<module>nd4j-cuda-preset</module>
<module>nd4j-cuda-platform</module>
</modules>
</profile>
<profile>
<id>libnd4j-cuda</id>

View File

@ -362,8 +362,11 @@
<configuration>
<environmentVariables>
<LD_LIBRARY_PATH>
${env.LD_LIBRARY_PATH}:${user.dir}:${libnd4jhome}/blasbuild/cpu/blas/
${env.LD_LIBRARY_PATH}:${user.dir}:${libnd4jhome}/blasbuild/cpu/blas/:${nd4j.native.basedir}/target/classes
</LD_LIBRARY_PATH>
<PATH>
${env.PATH}:${user.dir}:${libnd4jhome}/blasbuild/cpu/blas/:${nd4j.native.basedir}/target/classes
</PATH>
</environmentVariables>
<testSourceDirectory>src/test/java</testSourceDirectory>
<includes>

View File

@ -105,7 +105,7 @@
<include>*.java</include>
<include>**/*.java</include>
</includes>
<argLine>-Ddtype=float -Xmx8g</argLine>
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
</configuration>
</plugin>
</plugins>

View File

@ -107,7 +107,7 @@
<include>*.java</include>
<include>**/*.java</include>
</includes>
<argLine>-Ddtype=float -Xmx8g</argLine>
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
</configuration>
</plugin>
</plugins>

View File

@ -20,8 +20,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">
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>
@ -90,11 +90,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<inherited>true</inherited>
<dependencies>
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<environmentVariables>
<LD_LIBRARY_PATH>
${env.LD_LIBRARY_PATH}${path.separator}${user.dir}${path.separator}${libnd4jhome}/blasbuild/cpu/blas/${path.separator}${libnd4jhome}/../nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes
</LD_LIBRARY_PATH>
</environmentVariables>
<testSourceDirectory>src/test/java</testSourceDirectory>
<includes>
@ -119,6 +125,7 @@
For testing large zoo models, this may not be enough (so comment it out).
-->
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes"</argLine>
</configuration>
</plugin>
</plugins>
@ -150,9 +157,6 @@
</dependencies>
<configuration>
<environmentVariables>
<LD_LIBRARY_PATH>
${env.LD_LIBRARY_PATH}:${user.dir}:${libnd4jhome}/blasbuild/cuda/blas/
</LD_LIBRARY_PATH>
</environmentVariables>
<testSourceDirectory>src/test/java</testSourceDirectory>
<includes>
@ -175,7 +179,7 @@
Maximum heap size was set to 6g, as a minimum required value for tests run.
Depending on a build machine, default value is not always enough.
-->
<argLine>-Ddtype=float -Xmx6g</argLine>
<argLine>-Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
</configuration>
</plugin>
</plugins>

27
pom.xml
View File

@ -176,6 +176,9 @@
<javacpp.platform.additionalIncludePaths />
<javacpp.platform.cppincludepath />
<javacpp.platform.library.path />
<!-- Used in nd4j-backend-impls for directory-maven-plugin to assist with finding native libs for tests -->
<nd4j.native.basedir />
<nd4j.cuda.basedir />
<javacpp.version>1.5.4</javacpp.version>
<javacpp-presets.version>1.5.4</javacpp-presets.version>
<javacv.version>1.5.4</javacv.version>
@ -315,6 +318,7 @@
<rxjava.version>2.2.0</rxjava.version>
<kotlin.version>1.4.30</kotlin.version>
<junit4git.version>1.3</junit4git.version>
</properties>
@ -606,6 +610,27 @@
</pluginManagement>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>0.3.1</version>
<executions>
<execution>
<id>native-dir</id>
<goals>
<goal>directory-of</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>nd4j.basedir</property>
<project>
<groupId>org.nd4j</groupId>
<artifactId>nd4j</artifactId>
</project>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@ -939,6 +964,8 @@
<libnd4jhome>${basedir}/../../../../libnd4j/</libnd4jhome>
</properties>
</profile>
<!-- For Android: -Dplatform=android-arm -->
<profile>
<id>javacpp-platform-default</id>

View File

@ -101,7 +101,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>-Ddtype=double</argLine>
<argLine>-Ddtype=double -Dorg.bytedeco.javacpp.logger.debug=true -Djava.library.path="${nd4j.basedir}/nd4j-backends/nd4j-backend-impls/nd4j-cuda/target/classes"</argLine>
<!--
By default: Surefire will set the classpath based on the manifest. Because tests are not included
in the JAR, any tests that rely on class path scanning for resources in the tests directory will not