| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
Fixes #8221
This modifies the code snippet used to demonstrate link-time
specialization to use the public `loadModuleFromSourceString` API
instead of the internal `UnownedRawBlob::create`.
It also corrects a couple variable names in the snippet as well.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#8603)
This change achieves link-time type resolution with a different
mechanism.
For `extern struct Foo : IFoo = FooImpl;`,
instead of synthesizing a wrapper type `Foo` that has a `FooImpl inner`
field and dispatches all interface method calls to `inner.method()`,
this PR completely removes this synthesis step, and instead just lower
such `extern`/`export` types as `IRSymbolAlias` instructions that is
just a reference to the type being wrapped.
Then we extend the linker logic to clone the referenced symbol instead
of the SymbolAlias insts itself during linking.
By doing so, we greatly simply the logic need to support link-time
types, and achieves higher robustness by not having to deal with many
AST synthesis scenarios.
Closes #8554.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The link-time specialization documentation contained an incorrect
example that used `[ForceUnroll]` with a link-time type method call,
which would cause a compilation error. The issue was that
`[ForceUnroll]` requires loop bounds to be known at compile time, but
`sampler.getSampleCount()` is a method call that returns a value at
runtime.
**Problem:**
The documentation example showed:
```csharp
Sampler sampler;
[ForceUnroll]
for (int i = 0; i < sampler.getSampleCount(); i++)
output[tid] += sampler.sample(i);
```
This would fail with error: `loop does not terminate within the limited
number of iterations, unrolling is aborted.`
**Solution:**
Removed the `[ForceUnroll]` attribute entirely, leaving a simple loop:
```csharp
Sampler sampler;
for (int i = 0; i < sampler.getSampleCount(); i++)
output[tid] += sampler.sample(i);
```
Since the loop bounds come from a runtime method call, there's no way
for the loop to be unrolled regardless of the directive used, so the
simplest solution is to remove the unroll attribute completely.
- [x] Remove ForceUnroll attribute from documentation example
- [x] Remove explanatory note about unroll vs ForceUnroll
- [x] Remove test cases for the removed functionality
- [x] Fix missing closing backticks in code block
Fixes #8161.
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bmillsNV <163073245+bmillsNV@users.noreply.github.com>
Co-authored-by: expipiplus1 <857308+expipiplus1@users.noreply.github.com>
|
| |
|
|
|
| |
* Fix broken links in User Guide
* Fix link text with filename, use title
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
| | |
|
| |
|
| |
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
| |
* Add documentation for debugging.
* typo
|
| |
|