@@ -312,14 +312,14 @@ and you can run the benchmarks yourself with `cargo bench`.
312
312
313
313
You can also check out real-world projects using Rust GPU such as
314
314
[ ` autograph ` ] ( https://github.com/charles-r-earp/autograph ) and
315
- [ ` rederling ` ] ( https://renderling.xyz/ ) .
315
+ [ ` renderling ` ] ( https://renderling.xyz/ ) .
316
316
317
317
:::
318
318
319
319
## Reflections on porting to Rust GPU
320
320
321
321
Porting to Rust GPU went quickly, as the kernels Zach used were fairly simple. Most of
322
- the time was spent with concerns that were not specifically about writing GPU code. For
322
+ my time was spent with concerns that were not specifically about writing GPU code. For
323
323
example, deciding how much to abstract vs how much to make the code easy to follow, if
324
324
everything should be available at runtime or if each kernel should be a compilation
325
325
target, etc. [ The
@@ -460,15 +460,23 @@ other Rust project.
460
460
461
461
This required no new tools or workflows. The tools I already knew worked seamlessly.
462
462
More importantly, this approach benefits anyone working on the project. Any Rust
463
- engineer can run these benchmarks with no additional setup—cargo bench` is a standard
463
+ engineer can run these benchmarks with no additional setup—` cargo bench ` is a standard
464
464
part of the Rust ecosystem.
465
465
466
+ ### Formatting
467
+
468
+ Rust GPU code is formatted with ` rustfmt ` , following the same standards as all Rust
469
+ code. This not only ensured my GPU code looked identical to my CPU code, it made my GPU
470
+ code consistent with the _ entire Rust ecosystem_ . Leveraging standard tools like
471
+ ` rustfmt ` minimizes cognitive overhead and avoids the hassle of configuring third-party
472
+ formatters of varying quality.
473
+
466
474
### Lint
467
475
468
476
Linting GPU code in Rust works the same way as for CPU code. Running ` cargo clippy `
469
- highlighted issues and enforced consistent code quality. Any custom lint configurations
470
- are also applied to Rust GPU kernels. Lints ensure that GPU code is held to the same
471
- high standards as the rest of the project.
477
+ highlighted issues and enforced consistent code quality. Though I didn't have any,
478
+ custom lint configurations are applied to Rust GPU kernels as well . Lints ensure that
479
+ GPU code is held to the same high standards as the rest of the project.
472
480
473
481
### Documentation
474
482
0 commit comments