Commit bfb2195
committed
[TRTLLM-9687][fix] Enable pinned memory for tensor allocations in TorchSampler
- Updated tensor allocation in TorchSampler to use pinned memory for improved performance during D2H copies.
- Modified test_sampled_token_always_in_logprobs to include logprobs_mode parameter for enhanced testing of log probabilities.
Signed-off-by: Stefan Niebler <[email protected]>1 parent 3a28e24 commit bfb2195
File tree
2 files changed
+11
-6
lines changed- tensorrt_llm/_torch/pyexecutor
- tests/unittest/_torch/sampler
2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2596 | 2596 | | |
2597 | 2597 | | |
2598 | 2598 | | |
2599 | | - | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
2604 | 2604 | | |
2605 | 2605 | | |
2606 | 2606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
261 | 262 | | |
262 | | - | |
| 263 | + | |
| 264 | + | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
270 | 272 | | |
271 | 273 | | |
272 | 274 | | |
| 275 | + | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
| 480 | + | |
| 481 | + | |
477 | 482 | | |
478 | 483 | | |
479 | 484 | | |
| |||
0 commit comments