Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCuda with Gradle #42

Open
muliyul opened this issue Jul 9, 2021 · 3 comments
Open

JCuda with Gradle #42

muliyul opened this issue Jul 9, 2021 · 3 comments

Comments

@muliyul
Copy link

muliyul commented Jul 9, 2021

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?

@jcuda
Copy link
Owner

jcuda commented Jul 10, 2021

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 #16 (comment) ), 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...)

@muliyul
Copy link
Author

muliyul commented Jul 11, 2021

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.

@jcuda
Copy link
Owner

jcuda commented Jul 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants