Skip to content

Commit 2c7f632

Browse files
committed
Add System requirement and Project setup sections in README
1 parent 592da13 commit 2c7f632

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Compute.scala
22

3-
**Compute.scala** is a Scala library for scientific computing on N-dimensional arrays in parallel on GPU, CPU and other devices. It will be the primary back-end of the incoming [DeepLearning.scala](http://deeplearning.thoughtworks.school/) 3.0, to address performance problems we encountered in DeepLearning.scala 2.0 with [nd4j](http://nd4j.org/).
3+
**Compute.scala** is a Scala library for scientific computing with N-dimensional arrays in parallel on GPU, CPU and other devices. It will be the primary back-end of the incoming [DeepLearning.scala](http://deeplearning.thoughtworks.school/) 3.0, to address performance problems we encountered in DeepLearning.scala 2.0 with [nd4j](http://nd4j.org/).
44

55
* Compute.scala can dynamically merge multiple operators into one kernel program, which runs significantly faster when performing complex computation.
66
* Compute.scala manages memory and other native resource in a determinate approach, consuming less memory.
@@ -9,13 +9,52 @@
99

1010
## Getting started
1111

12-
TODO:
12+
### System Requirements
13+
14+
Compute.scala is based on [LWJGL 3](https://www.lwjgl.org/)'s OpenCL binding, which supports AMD, NVIDIA and Intel's GPU and CPU on Linux, Windows and macOS.
15+
16+
Make sure you have met the following system requirements before using Compute.scala.
17+
18+
* Linux, Windows or macOS
19+
* JDK 8
20+
* OpenCL runtime
21+
22+
The performance of Compute.scala varies according to which OpenCL runtime you are using. For best performance, install OpenCL runtime according to the following table.
23+
24+
| | Linux | Windows | macOS |
25+
| --- | --- | --- | --- |
26+
| NVIDIA GPU | [NVIDIA GPU Driver](http://www.nvidia.com/drivers) | [NVIDIA GPU Driver](http://www.nvidia.com/drivers) | macOS's built-in OpenCL SDK |
27+
| AMD GPU | [AMDGPU-PRO Driver](https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx) | [AMD OpenCL™ 2.0 Driver](https://support.amd.com/en-us/kb-articles/Pages/OpenCL2-Driver.aspx) | macOS's built-in OpenCL SDK |
28+
| Intel or AMD CPU | [POCL](http://portablecl.org/) | [POCL](http://portablecl.org/) | [POCL](http://portablecl.org/) |
29+
30+
Especially, Compute.scala produces non-vectorized code, which needs POCL's auto-vectorization feature for best performance when running on CPU.
31+
32+
### Project setup
33+
34+
The artifacts of Compute.scala is published on Maven central repository for Scala 2.11 and 2.12. Add the following settings to your `build.sbt` if you are using [sbt](https://www.scala-sbt.org/).
35+
36+
``` sbt
37+
libraryDependencies += "com.thoughtworks.compute" %% "cpu" % "latest.release"
38+
libraryDependencies += "com.thoughtworks.compute" %% "gpu" % "latest.release"
39+
40+
// Platform dependent runtime of LWJGL core library
41+
libraryDependencies += ("org.lwjgl" % "lwjgl" % "latest.release" % Runtime).jar().classifier {
42+
import scala.util.Properties._
43+
if (isMac) {
44+
"natives-macos"
45+
} else if (isLinux) {
46+
"natives-linux"
47+
} else if (isWin) {
48+
"natives-windows"
49+
} else {
50+
throw new MessageOnlyException(s"lwjgl does not support $osName")
51+
}
52+
}
53+
```
54+
55+
Check [Compute.scala on Scaladex](https://index.scala-lang.org/thoughtworksinc/compute.scala) and [LWJGL customize tool](https://www.lwjgl.org/customize) for settings for other build tools.
1356

1457
## Benchmark
1558

1659
* [Compute.scala vs Nd4j on NVIDIA GPU](http://jmh.morethan.io/?source=https://thoughtworksinc.github.io/Compute.scala/benchmarks/nvidia-gpu.json)
1760
* [Compute.scala on AMD GPU](http://jmh.morethan.io/?source=https://thoughtworksinc.github.io/Compute.scala/benchmarks/amd-gpu.json)
18-
19-
## Supported platforms
20-
21-
Compute.scala is based on OpenCL, supporting AMD, NVIDIA and Intel's GPU and CPU on Linux, Windows and macOS.

0 commit comments

Comments
 (0)