moved to torch 1.10.2
This commit is contained in:
parent
705b27aa4b
commit
9ca896b608
@ -26,6 +26,9 @@ $ ./gradlew -Dorg.gradle.java.home=/path/to/local/jdk -q publishToMavenLocal
|
||||
```
|
||||
This will fetch and build the `JNI` wrapper `jnoa`.
|
||||
|
||||
The library has been tested with
|
||||
[graalvm-ce-java11-linux-amd64-22.0.0.2.](https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz)
|
||||
|
||||
In your own application add the local dependency:
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -34,12 +37,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:kmath-noa:0.3.0-dev-14")
|
||||
implementation("space.kscience:kmath-noa:0.3.0-dev-17")
|
||||
}
|
||||
```
|
||||
To load the native library you will need to add to the VM options:
|
||||
```
|
||||
-Djava.library.path=${HOME}/.konan/third-party/noa-v0.0.1/cpp-build/jnoa
|
||||
-Djava.library.path=${HOME}/.kmath/third-party/noa-v0.0.1/cpp-build/jnoa
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -20,7 +20,7 @@ dependencies {
|
||||
|
||||
val home: String = System.getProperty("user.home")
|
||||
val javaHome: String = System.getProperty("java.home")
|
||||
val thirdPartyDir = "$home/.konan/third-party/noa-v0.0.1"
|
||||
val thirdPartyDir = "$home/.kmath/third-party/noa-v0.0.1"
|
||||
val cppBuildDir = "$thirdPartyDir/cpp-build"
|
||||
val jNoaDir = "$thirdPartyDir/jnoa/noa-kmath"
|
||||
|
||||
@ -72,8 +72,8 @@ val downloadClang by tasks.registering(Download::class) {
|
||||
}
|
||||
|
||||
val downloadTorch by tasks.registering(Download::class) {
|
||||
val torchVersion = "$torchArchive-shared-with-deps-1.9.0%2B"
|
||||
val cudaUrl = "https://download.pytorch.org/libtorch/cu111/${torchVersion}cu111.zip"
|
||||
val torchVersion = "$torchArchive-shared-with-deps-1.10.2%2B"
|
||||
val cudaUrl = "https://download.pytorch.org/libtorch/cu113/${torchVersion}cu113.zip"
|
||||
val cpuUrl = "https://download.pytorch.org/libtorch/cpu/${torchVersion}cpu.zip"
|
||||
val url = if (cudaFound) cudaUrl else cpuUrl
|
||||
src(url)
|
||||
|
Loading…
Reference in New Issue
Block a user