Commit 88e0247
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 b04e7e6 commit 88e0247
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 | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | | - | |
2715 | | - | |
2716 | | - | |
2717 | | - | |
2718 | | - | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
2719 | 2719 | | |
2720 | 2720 | | |
2721 | 2721 | | |
| |||
| 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