From 84937ecaca64b08e56f1c312ebfa9d6863eda23e Mon Sep 17 00:00:00 2001 From: Roland Grinis Date: Sun, 27 Jun 2021 16:28:28 +0100 Subject: [PATCH] update instructions --- kmath-noa/README.md | 21 +++++++++++++++++++-- kmath-noa/build.gradle.kts | 4 ++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/kmath-noa/README.md b/kmath-noa/README.md index 1238dc885..9ca1933f6 100644 --- a/kmath-noa/README.md +++ b/kmath-noa/README.md @@ -10,5 +10,22 @@ which covers a wide set of applications from particle physics simulations to deep learning and general differentiable programs written on top of `AutoGrad` & `ATen`. -Currently, the native artifacts support only `GNU` and -`CUDA` for GPU acceleration. \ No newline at end of file +## Installation + +Currently, to build native artifacts, we support only +the [GNU](https://gcc.gnu.org/) toolchain. For `GPU` kernels, we require a compatible +[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) +installation. If you are on Windows, we recommend setting up +everything on [WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html). + +To install the library, you have to publish +locally `kmath-core`, `kmath-tensors` with `kmath-noa`: + +``` +./gradlew -q :kmath-core:publishToMavenLocal :kmath-tensors:publishToMavenLocal :kmath-noa:publishToMavenLocal +``` + +This builds `jtorch` a JNI wrapper for `NOA/LibTorch`, placed inside: + +`~/.konan/third-party/kmath-noa-/cpp-build` + diff --git a/kmath-noa/build.gradle.kts b/kmath-noa/build.gradle.kts index b2770df1e..34c7b730b 100644 --- a/kmath-noa/build.gradle.kts +++ b/kmath-noa/build.gradle.kts @@ -18,8 +18,8 @@ dependencies { api(project(":kmath-tensors")) } -val home = System.getProperty("user.home") -val javaHome = System.getProperty("java.home") +val home: String = System.getProperty("user.home") +val javaHome: String = System.getProperty("java.home") val thirdPartyDir = "$home/.konan/third-party/kmath-noa-${project.property("version")}" val cppBuildDir = "$thirdPartyDir/cpp-build" val cppSources = projectDir.resolve("src/main/cpp")