jcuda-main
jcuda-main copied to clipboard
JCuda with Gradle
Looks like defining the classifier
does not work.
// build.gradle.kts
val cudaClassifier = "${getOsString()}-${getArchString()}"
implementation("org.jcuda:jcuda:11.2.0") {
// exclude("org.jcuda:jcuda-natives:11.2.0")
}
implementation("org.jcuda:jcuda-natives:11.2.0:$cudaClassifier")
results in
Could not find jcuda-natives-11.2.0-${jcuda.os}-${jcuda.arch}.jar (org.jcuda:jcuda-natives:11.2.0).
Any ideas?
It seems to resolve the jcuda.os
and jcuda.arch
properly and assemble the right file name. But I haven't jused Gradle so extensively yet (as mentioned in the USAGE.md file, the Gradle script was largely taken from https://github.com/jcuda/jcuda-main/issues/16#issuecomment-323610823 ), so I wonder at which point in the build process this error message appears.
(In doubt, I'd try to ping one of the contributors from the linked issue, maybe they can provide further insights...)
I've solved it with the following:
val cudaClassifier = "${getOsString()}-${getArchString()}"
implementation("org.jcuda:jcuda:11.2.0") {
isTransitive = false
}
implementation("org.jcuda:jcuda-natives:11.2.0:$cudaClassifier")
In other words - exclude the transitive dependencies and manually include them.
The compile
entries already contain that transitive = false
, so I'm not entirely sure where the difference comes into play.
I'll leave this issue open for now. If others confirm that the build file might have to be updated, maybe the update can be derived from the discussion here.