parent
54efcb8d47
commit
48f20f1f27
|
@ -49,4 +49,10 @@ public class LoadBackendTests {
|
|||
Number n = res.sumNumber();
|
||||
assertEquals(n.doubleValue(), 7.0, String.format("Addition of two scalar values %g and %g", d1, d2));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void loadCudaDLL() {
|
||||
System.load(
|
||||
"C:\\Users\\brian\\_projects\\deeplearning4j\\cavis-native\\cavis-native-lib\\build\\generated\\sources\\javacpp\\cuda\\windows-x86_64-avx2\\jni_nd4jcuda.dll");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ buildscript {
|
|||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.bytedeco.gradle-javacpp-build' version "1.5.9" //version "1.5.10-SNAPSHOT"
|
||||
id 'org.bytedeco.gradle-javacpp-build' version "1.5.10-SNAPSHOT" //version "1.5.10-SNAPSHOT"
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ chipList.each {String thisChip ->
|
|||
include "org/nd4j/nativeblas/${thisChip}/Nd4j${thisChip.capitalize()}Presets.java"
|
||||
}
|
||||
}*/
|
||||
sourceSets.register("${thisChip}") {
|
||||
sourceSets.register("${thisChip}").configure {
|
||||
java {
|
||||
srcDirs = ["${buildDir}/generated/sources/javacpp/${thisChip}/${javacppPlatform}${javacppPlatformExtension}/"]
|
||||
include "org/nd4j/nativeblas/Nd4j${thisChip.capitalize()}.java"
|
||||
|
@ -96,9 +96,11 @@ sourceSets {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// This block registers the cpu and cuda features and creates
|
||||
// i. e. the {chip}Implementation
|
||||
java {
|
||||
|
@ -294,9 +296,6 @@ chipList.each { String thisChip ->
|
|||
|
||||
// Generates jnijavacpp.cpp and jniNativeLibrary.cpp, compiles and links it
|
||||
tasks.register("javacpp${thisChip.capitalize()}SupportBuildCompiler", org.bytedeco.gradle.javacpp.BuildTask) {org.bytedeco.gradle.javacpp.BuildTask it ->
|
||||
if (project.hasProperty("skip-native") && project.getProperty("skip-native").equals("true")) {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
linkPath = ["${projectDir}/blasbuild/${thisChip}/${avxExtension}/output"]
|
||||
includePath = ["${projectDir}/src/main/cpp/blas/",
|
||||
|
@ -389,6 +388,9 @@ chipList.each { String thisChip ->
|
|||
tasks.named("compileJava").configure {enabled false}
|
||||
|
||||
chipList.each { String thisChip ->
|
||||
tasks.named("build").configure {
|
||||
dependsOn "javacpp${thisChip.capitalize()}SupportBuildCompiler"
|
||||
}
|
||||
tasks.named("javacpp${thisChip.capitalize()}SupportBuildCompiler").configure {
|
||||
dependsOn "javacpp${thisChip.capitalize()}SupportBuildParser"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue