Skip to content

Commit 77b8e17

Browse files
committed
Clarify use of the word "codegen".
The existing text uses "codegen" frequently as a shorthand for "codegen backend". I found this confusing and distracting. ("Codegens" is even worse.) This commit replaces these uses with "codegen backend" (or occasionally something else more appropriate). The commit preserves the use of "codegen" for the act of code generation, e.g. "during codegen we do XYZ", because that's more standard.
1 parent 5c6fbf8 commit 77b8e17

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

guide/src/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ This can be circumvented by building LLVM in a special way, but this is far beyo
1414
which yield considerable performance differences (especially on more complex kernels with more information in the IR).
1515
- For some reason (either rustc giving weird LLVM IR or the LLVM PTX backend being broken) the LLVM PTX backend often
1616
generates completely invalid PTX for trivial programs, so it is not an acceptable workflow for a production pipeline.
17-
- GPU and CPU codegen is fundamentally different, creating a codegen that is only for the GPU allows us to
18-
seamlessly implement features which would have been impossible or very difficult to implement in the existing codegen, such as:
17+
- GPU and CPU codegen is fundamentally different, creating a codegen backend that is only for the GPU allows us to
18+
seamlessly implement features which would have been impossible or very difficult to implement in the existing codegen backend, such as:
1919
- Shared memory, this requires some special generation of globals with custom addrspaces, its just not possible to do without backend explicit handling.
2020
- Custom linking logic to do dead code elimination so as to not end up with large PTX files full of dead functions/globals.
2121
- Stripping away everything we do not need, no complex ABI handling, no shared lib handling, control over how function calls are generated, etc.
@@ -33,7 +33,7 @@ Long answer, there are a couple of things that make this impossible:
3333
- NVVM IR is a __subset__ of LLVM IR, there are tons of things that NVVM will not accept. Such as a lot of function attrs not being allowed.
3434
This is well documented and you can find the spec [here](https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html). Not to mention
3535
many bugs in libNVVM that I have found along the way, the most infuriating of which is nvvm not accepting integer types that arent `i1, i8, i16, i32, or i64`.
36-
This required special handling in the codegen to convert these "irregular" types into vector types.
36+
This required special handling in the codegen backend to convert these "irregular" types into vector types.
3737

3838
## What is the point of using Rust if a lot of things in kernels are unsafe?
3939

guide/src/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ around to adding it yet.
5454
| cuSPARSE ||
5555
| AmgX ||
5656
| cuTENSOR ||
57-
| OptiX | 🟨 | CPU OptiX is mostly complete, GPU OptiX is still heavily in-progress because it needs support from the codegen |
57+
| OptiX | 🟨 | CPU OptiX is mostly complete, GPU OptiX is still heavily in-progress because it needs support from the codegen backend |
5858

5959
# GPU-side Features
6060

guide/src/guide/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before you can use the project to write GPU crates, you will need a couple of pr
1010

1111
This is only for building GPU crates, to execute built PTX you only need CUDA `9+`.
1212

13-
- LLVM 7.x (7.0 to 7.4), The codegen searches multiple places for LLVM:
13+
- LLVM 7.x (7.0 to 7.4), The codegen backend searches multiple places for LLVM:
1414

1515
- If `LLVM_CONFIG` is present, it will use that path as `llvm-config`.
1616
- Or, if `llvm-config` is present as a binary, it will use that, assuming that `llvm-config --version` returns `7.x.x`.

0 commit comments

Comments
 (0)