Skip to content

Commit 70e0a7e

Browse files
[libclc] Convert README to Markdown (#111549)
A bit nicer to read on GitHub and with clickable links. No content changes purely formatting.
1 parent 10054ba commit 70e0a7e

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed
Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
libclc
2-
------
1+
# libclc
32

43
libclc is an open source implementation of the library
54
requirements of the OpenCL C programming language, as specified by the
65
OpenCL 1.1 Specification. The following sections of the specification
76
impose library requirements:
87

9-
* 6.1: Supported Data Types
10-
* 6.2.3: Explicit Conversions
11-
* 6.2.4.2: Reinterpreting Types Using as_type() and as_typen()
12-
* 6.9: Preprocessor Directives and Macros
13-
* 6.11: Built-in Functions
14-
* 9.3: Double Precision Floating-Point
15-
* 9.4: 64-bit Atomics
16-
* 9.5: Writing to 3D image memory objects
17-
* 9.6: Half Precision Floating-Point
8+
* 6.1: Supported Data Types
9+
* 6.2.3: Explicit Conversions
10+
* 6.2.4.2: Reinterpreting Types Using as_type() and as_typen()
11+
* 6.9: Preprocessor Directives and Macros
12+
* 6.11: Built-in Functions
13+
* 9.3: Double Precision Floating-Point
14+
* 9.4: 64-bit Atomics
15+
* 9.5: Writing to 3D image memory objects
16+
* 9.6: Half Precision Floating-Point
1817

1918
libclc is intended to be used with the Clang compiler's OpenCL frontend.
2019

@@ -26,44 +25,43 @@ functions.
2625
libclc currently supports PTX, AMDGPU, SPIRV and CLSPV targets, but support for
2726
more targets is welcome.
2827

29-
Compiling and installing
30-
------------------------
28+
## Compiling and installing
3129

32-
(in the following instructions you can use make or ninja)
30+
(in the following instructions you can use `make` or `ninja`)
3331

3432
For an in-tree build, Clang must also be built at the same time:
35-
33+
```
3634
$ cmake <path-to>/llvm-project/llvm/CMakeLists.txt -DLLVM_ENABLE_PROJECTS="libclc;clang" \
3735
-DCMAKE_BUILD_TYPE=Release -G Ninja
3836
$ ninja
39-
37+
```
4038
Then install:
41-
39+
```
4240
$ ninja install
43-
44-
Note you can use the DESTDIR Makefile variable to do staged installs.
45-
41+
```
42+
Note you can use the `DESTDIR` Makefile variable to do staged installs.
43+
```
4644
$ DESTDIR=/path/for/staged/install ninja install
47-
45+
```
4846
To build out of tree, or in other words, against an existing LLVM build or install:
49-
47+
```
5048
$ cmake <path-to>/llvm-project/libclc/CMakeLists.txt -DCMAKE_BUILD_TYPE=Release \
5149
-G Ninja -DLLVM_DIR=$(<path-to>/llvm-config --cmakedir)
5250
$ ninja
53-
51+
```
5452
Then install as before.
5553

5654
In both cases this will include all supported targets. You can choose which
5755
targets are enabled by passing `-DLIBCLC_TARGETS_TO_BUILD` to CMake. The default
58-
is "all".
56+
is `all`.
5957

6058
In both cases, the LLVM used must include the targets you want libclc support for
61-
(AMDGPU and NVPTX are enabled in LLVM by default). Apart from SPIRV where you do
62-
not need an LLVM target but you do need the llvm-spirv tool
63-
(https://github.com/KhronosGroup/SPIRV-LLVM-Translator) available. Either build
64-
this in-tree, or place it in the directory pointed to by `LLVM_TOOLS_BINARY_DIR`.
59+
(`AMDGPU` and `NVPTX` are enabled in LLVM by default). Apart from `SPIRV` where you do
60+
not need an LLVM target but you do need the
61+
[llvm-spirv tool](https://github.com/KhronosGroup/SPIRV-LLVM-Translator) available.
62+
Either build this in-tree, or place it in the directory pointed to by
63+
`LLVM_TOOLS_BINARY_DIR`.
6564

66-
Website
67-
-------
65+
## Website
6866

6967
https://libclc.llvm.org/

0 commit comments

Comments
 (0)