Commit ff1641a
committed
deps: Tensors 0.50.0 -> 0.50.1 + adapt to Func<Tensor<T>> trace lambdas
Tensors 0.50.1 is the release the open compile-tracer bugs point to;
0.50.0 was the one I initially pinned but it's strictly a prerequisite
step. The API change that matters for us:
GetOrCompileInference / GetOrCompileTraining accept Func<Tensor<T>>
(return = plan output tensor) instead of Action (tail-op inferred).
The explicit return fixes the shape-conditional truncation that forced
PR #1167's Predict-bypass workaround: the tracer no longer guesses
which op produced the plan's output, so rank-3 -> rank-4 promotions
and post-forward reshapes no longer get silently dropped.
Three call sites updated to return the last tensor explicitly:
src/AiModelBuilder.cs:1344 — return nnModel.Predict(input)
src/Training/CompiledTapeTrainingStep.cs:139 — return computeLoss(...)
src/Training/CompiledTapeTrainingStep.cs:269 — return computeLoss(...)
Follow-up (separate PR): revert the 11 Predict-override-restore sites
from PR #1167 back to PredictEager now that the tracer actually
captures their forward behaviour correctly.
Build: dotnet build -f net10.0 + net471 both green, 0 errors.1 parent 4edcccf commit ff1641a
3 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1377 | 1379 | | |
1378 | 1380 | | |
1379 | 1381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | | - | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
271 | 279 | | |
272 | | - | |
| 280 | + | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
| |||
0 commit comments