parent
4793864178
commit
94da6843cd
|
@ -17,7 +17,8 @@ RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/r
|
||||||
RUN apt-get update && apt-get upgrade -y && \
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk \
|
||||||
build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \
|
build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \
|
||||||
libcudnn8=${cudnn_version}-1+${cuda_version} libcudnn8-dev=${cudnn_version}-1+${cuda_version}
|
libcudnn8=${cudnn_version}-1+${cuda_version} libcudnn8-dev=${cudnn_version}-1+${cuda_version} \
|
||||||
|
cuda-drivers
|
||||||
|
|
||||||
|
|
||||||
#RUN apt-get install libcudnn8-samples=${cudnn_version}-1+${cuda_version}
|
#RUN apt-get install libcudnn8-samples=${cudnn_version}-1+${cuda_version}
|
||||||
|
|
|
@ -57,7 +57,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test-linux-cuda') {
|
stage('test-linux-cuda') {
|
||||||
agent {
|
/* agent {
|
||||||
dockerfile {
|
dockerfile {
|
||||||
filename 'Dockerfile'
|
filename 'Dockerfile'
|
||||||
dir '.docker'
|
dir '.docker'
|
||||||
|
@ -66,11 +66,12 @@ pipeline {
|
||||||
args '--gpus all' //--needed for test only, you can build without GPU
|
args '--gpus all' //--needed for test only, you can build without GPU
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
environment {
|
environment {
|
||||||
MAVEN = credentials('Internal_Archiva')
|
MAVEN = credentials('Internal_Archiva')
|
||||||
OSSRH = credentials('OSSRH')
|
OSSRH = credentials('OSSRH')
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
steps {
|
steps {
|
||||||
withGradle {
|
withGradle {
|
||||||
sh 'sh ./gradlew test --stacktrace -PexcludeTests=\'long-running,performance\' -Pskip-native=true -PCAVIS_CHIP=cuda \
|
sh 'sh ./gradlew test --stacktrace -PexcludeTests=\'long-running,performance\' -Pskip-native=true -PCAVIS_CHIP=cuda \
|
||||||
|
@ -79,6 +80,8 @@ pipeline {
|
||||||
}
|
}
|
||||||
//stash includes: '/cavis-native/cavis-native-lib/build/lib/*.jar', name: 'cuda-build'
|
//stash includes: '/cavis-native/cavis-native-lib/build/lib/*.jar', name: 'cuda-build'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ dependencies {
|
||||||
api "org.bytedeco:hdf5:${hdf5.version}-${javacpp.presetsVersion}:${javacppPlatform}"
|
api "org.bytedeco:hdf5:${hdf5.version}-${javacpp.presetsVersion}:${javacppPlatform}"
|
||||||
|
|
||||||
api "org.bytedeco:cuda:${cuda.version}-${cudnn.version}-${javacpp.presetsVersion}"
|
api "org.bytedeco:cuda:${cuda.version}-${cudnn.version}-${javacpp.presetsVersion}"
|
||||||
api "org.bytedeco:cuda-platform-redist:${cuda.version}-${cudnn.version}-${javacpp.presetsVersion}"
|
//api "org.bytedeco:cuda-platform-redist:${cuda.version}-${cudnn.version}-${javacpp.presetsVersion}"
|
||||||
api "org.bytedeco:mkl:${mkl.version}-${javacpp.presetsVersion}"
|
api "org.bytedeco:mkl:${mkl.version}-${javacpp.presetsVersion}"
|
||||||
api "org.bytedeco:tensorflow:${tensorflow.version}-1.5.8" //not available for javacpp 1.5.9 ?
|
api "org.bytedeco:tensorflow:${tensorflow.version}-1.5.8" //not available for javacpp 1.5.9 ?
|
||||||
api "org.bytedeco:tensorflow-platform:${tensorflow.version}-1.5.8"
|
api "org.bytedeco:tensorflow-platform:${tensorflow.version}-1.5.8"
|
||||||
|
|
|
@ -130,13 +130,13 @@ import java.util.List;
|
||||||
compiler = {"cpp11", "nowarnings"},
|
compiler = {"cpp11", "nowarnings"},
|
||||||
library = "jnind4jcuda",
|
library = "jnind4jcuda",
|
||||||
link = "nd4jcuda",
|
link = "nd4jcuda",
|
||||||
preload = "libnd4jcuda"),
|
preload = "nd4jcuda"),
|
||||||
|
|
||||||
@Platform(value = "linux", preload = "gomp@.1", preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/", "/usr/local/cuda/lib64"}),
|
@Platform(value = "linux", preload = "gomp@.1", preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/", "/usr/local/cuda/lib64"}),
|
||||||
@Platform(value = "linux-armhf", preloadpath = {"/usr/arm-linux-gnueabihf/lib/", "/usr/lib/arm-linux-gnueabihf/"}),
|
@Platform(value = "linux-armhf", preloadpath = {"/usr/arm-linux-gnueabihf/lib/", "/usr/lib/arm-linux-gnueabihf/"}),
|
||||||
@Platform(value = "linux-arm64", preloadpath = {"/usr/aarch64-linux-gnu/lib/", "/usr/lib/aarch64-linux-gnu/"}),
|
@Platform(value = "linux-arm64", preloadpath = {"/usr/aarch64-linux-gnu/lib/", "/usr/lib/aarch64-linux-gnu/"}),
|
||||||
@Platform(value = "linux-ppc64", preloadpath = {"/usr/powerpc64-linux-gnu/lib/", "/usr/powerpc64le-linux-gnu/lib/", "/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
|
@Platform(value = "linux-ppc64", preloadpath = {"/usr/powerpc64-linux-gnu/lib/", "/usr/powerpc64le-linux-gnu/lib/", "/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
|
||||||
@Platform(value = "windows", preload = {"libwinpthread-1", "libgcc_s_seh-1", "libgomp-1", "libstdc++-6", "libnd4jcuda"})
|
@Platform(value = "windows", preload = {"libwinpthread-1", "libgcc_s_seh-1", "libgomp-1", "libstdc++-6", "nd4jcuda"})
|
||||||
})
|
})
|
||||||
public class Nd4jCudaPresets implements LoadEnabled, InfoMapper {
|
public class Nd4jCudaPresets implements LoadEnabled, InfoMapper {
|
||||||
|
|
||||||
|
@ -170,9 +170,9 @@ public class Nd4jCudaPresets implements LoadEnabled, InfoMapper {
|
||||||
preloads.add(i++, lib);
|
preloads.add(i++, lib);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i > 0) {
|
//if (i > 0) {
|
||||||
resources.add("/org/bytedeco/cuda/");
|
resources.add("/org/bytedeco/cuda/");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,6 +28,9 @@ set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
# MSVC runtime lib can be either "MultiThreaded" or "MultiThreadedDLL", /MT and /MD respectively
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
|
||||||
|
|
||||||
#///////////////////////////////////////////////////////////////////////////////
|
#///////////////////////////////////////////////////////////////////////////////
|
||||||
# genCompilation: Generates cpp, cu files
|
# genCompilation: Generates cpp, cu files
|
||||||
# INPUT:
|
# INPUT:
|
||||||
|
@ -139,8 +142,7 @@ else()
|
||||||
set(DEFAULT_ENGINE "samediff::ENGINE_CPU")
|
set(DEFAULT_ENGINE "samediff::ENGINE_CPU")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# MSVC runtime lib can be either "MultiThreaded" or "MultiThreadedDLL", /MT and /MD respectively
|
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
|
|
||||||
|
|
||||||
set(SD_X86_BUILD false)
|
set(SD_X86_BUILD false)
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,7 @@ if(SD_CUDA)
|
||||||
add_definitions(-D_HAS_AUTO_PTR_ETC=1)
|
add_definitions(-D_HAS_AUTO_PTR_ETC=1)
|
||||||
|
|
||||||
set(CMAKE_CUDA_RUNTIME_LIBRARY "shared")
|
set(CMAKE_CUDA_RUNTIME_LIBRARY "shared")
|
||||||
|
set(CMAKE_CUDA_ARCHITECTURES "62;75")
|
||||||
|
|
||||||
#This basically kills instrinsic activated through SD_F16C=true
|
#This basically kills instrinsic activated through SD_F16C=true
|
||||||
#if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
#if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
@ -191,9 +192,7 @@ if(SD_CUDA)
|
||||||
set(EXPM " -D__ND4J_EXPERIMENTAL__=true")
|
set(EXPM " -D__ND4J_EXPERIMENTAL__=true")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
|
|
||||||
set(CMAKE_CUDA_ARCHITECTURES 75)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# the only difference for debug mode here is host/device debug symbols
|
# the only difference for debug mode here is host/device debug symbols
|
||||||
set(CMAKE_CUDA_FLAGS_DEBUG " -G -g")
|
set(CMAKE_CUDA_FLAGS_DEBUG " -G -g")
|
||||||
|
|
Loading…
Reference in New Issue