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