1
2 # Babylon and HAT Quick Install
3
4 ----
5 * [Contents](hat-00.md)
6 * Build Babylon and HAT
7 * [Quick Install](hat-01-quick-install.md)
8 * [Building Babylon with jtreg](hat-01-02-building-babylon.md)
9 * [Building HAT with jtreg](hat-01-03-building-hat.md)
10 * [Enabling the NVIDIA CUDA Backend](hat-01-05-building-hat-for-cuda.md)
11 * [Testing Framework](hat-02-testing-framework.md)
12 * [Running Examples](hat-03-examples.md)
13 * [HAT Programming Model](hat-03-programming-model.md)
14 * Interface Mapping
15 * [Interface Mapping Overview](hat-04-01-interface-mapping.md)
16 * [Cascade Interface Mapping](hat-04-02-cascade-interface-mapping.md)
17 * Development
18 * [Project Layout](hat-01-01-project-layout.md)
19 * Implementation Details
20 * [Walkthrough Of Accelerator.compute()](hat-accelerator-compute.md)
21 * [How we minimize buffer transfers](hat-minimizing-buffer-transfers.md)
22 * [Running HAT with Docker on NVIDIA GPUs](hat-07-docker-build-nvidia.md)
23 ---
24
25 ## General Overview
26
27 This page shows a minimal installation and configuration for Babylon and HAT.
28 You can follow this guidelines to get started.
29
30 Alternatively, if you want to control more options during the installation,
31 such as `jtreg`, follow these links:
32 - [Building Babylon](hat-01-02-building-babylon.md)
33 - [Building HAT](hat-01-03-building-hat.md)
34
35 If you want to enable the CUDA backend for running on NVIDIA GPUs, use the following link
36 to obtain the list of dependencies for the CUDA SDK.
37
38 - [Enabling the NVIDIA CUDA Backend](hat-01-05-building-hat-for-cuda.md)
39
40 ## 1. Build Babylon JDK
41
42 ```bash
43 git clone https://github.com/openjdk/babylon
44 cd babylon
45 bash configure --with-boot-jdk=${JAVA_HOME}
46 make clean
47 make images
48 ```
49
50 ## 2. Update JAVA_HOME and PATH
51
52 ```bash
53 export JAVA_HOME=<BABYLON-DIR>/build/macosx-aarch64-server-release/jdk/
54 export PATH=$JAVA_HOME/bin:$PATH
55 ```
56
57 ## 3. Build HAT
58
59 ```bash
60 sdk install jextract #if needed
61 cd hat
62 java @.bld
63 ```
64
65 Done!
66
67 ## 4. Run Examples
68
69 For instance, matrix-multiply:
70
71 ```bash
72 java @.run ffi-opencl matmul --size=1024
73 ```
74
75 ## 5. Unit-Tests
76
77 OpenCL backend:
78
79 ```bash
80 java @.test-suite ffi-opencl
81 ```
82
83 CUDA backed:
84
85 ```bash
86 java @.test-suite ffi-cuda
87 ```
88
89