diff options
| author | Gangzheng Tong <gtong@nvidia.com> | 2025-04-11 15:34:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-11 22:34:07 +0000 |
| commit | 8e6af6259bd1dd47d81c36f0562ff362ca5d42c3 (patch) | |
| tree | 86e7a9671dae748922ca18eec544a318cd708443 /docs/user-guide/10-link-time-specialization.md | |
| parent | 61a6c211b1587a7b9ed6a24ae1ba6fe0600c80d8 (diff) | |
Fix user-guide typos (#6789)
* Fix user-guide typos
Use LLM to scan each of the markdown files to fix typos.
Try not to change anything but the typos in this CL.
* typo not caught by LLM
* add output of ./build_toc.ps1
Diffstat (limited to 'docs/user-guide/10-link-time-specialization.md')
| -rw-r--r-- | docs/user-guide/10-link-time-specialization.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/user-guide/10-link-time-specialization.md b/docs/user-guide/10-link-time-specialization.md index 4c8a110bf..eba29076f 100644 --- a/docs/user-guide/10-link-time-specialization.md +++ b/docs/user-guide/10-link-time-specialization.md @@ -5,10 +5,10 @@ permalink: /user-guide/link-time-specialization # Link-time Specialization and Module Precompilation -Traditionally, graphics developers have been relying on the preprocessor defines to specialize their shader code for high-performance GPU execution. +Traditionally, graphics developers have been relying on preprocessor defines to specialize their shader code for high-performance GPU execution. While functioning systems can be built around preprocessor macros, overusing them leads to many problems: -- Long compilation time. With preprocessors defines, specialization happens before parsing, which is a very early stage in the compilation flow. - This means that the compiler must redo almost all work from the scratch with every specialized variant, including parsing, type checking, IR generation +- Long compilation time. With preprocessor defines, specialization happens before parsing, which is a very early stage in the compilation flow. + This means that the compiler must redo almost all work from scratch with every specialized variant, including parsing, type checking, IR generation and optimization, even when two specialized variants only differ in one constant value. The lack of reuse of compiler front-end work between different shader specializations contributes a significant portion to long shader compile times. - Reduced code readability and maintainability. The compiler cannot enforce any structures on preprocessor macros and cannot offer static checks to @@ -238,7 +238,7 @@ bool ISession::isBinaryModuleUpToDate( slang::IBlob* binaryModuleBlob); ``` -If the compiler options or source files has been changed since the module was last compiled, the `isBinaryModuleUpToDate` will return false. +If the compiler options or source files have been changed since the module was last compiled, the `isBinaryModuleUpToDate` will return false. The compiler can be setup to automatically use the precompiled modules when they exist and up-to-date. When loading a module, either triggered via the `ISession::loadModule` call or via transitive `import`s in the modules being loaded, the compiler will look in the |
