[Hardware][Neuron] Refactor neuron support (#3471)
This commit is contained in:
@@ -2,7 +2,7 @@ import torch
|
||||
from dataclasses import dataclass
|
||||
from vllm.model_executor.layers.rejection_sampler import RejectionSampler
|
||||
from typing import Optional
|
||||
from vllm.utils import in_wsl
|
||||
from vllm.utils import is_pin_memory_available
|
||||
import time
|
||||
from typing import Callable
|
||||
|
||||
@@ -63,7 +63,7 @@ class AsyncMetricsCollector:
|
||||
|
||||
self._in_flight_copy: Optional[torch.cuda.Event] = None
|
||||
|
||||
pin_memory = not in_wsl()
|
||||
pin_memory = is_pin_memory_available()
|
||||
self._aggregate_num_accepted_tokens = torch.tensor(
|
||||
0, dtype=torch.long, device="cpu", pin_memory=pin_memory)
|
||||
self._aggregate_num_emitted_tokens = torch.tensor(
|
||||
|
||||
Reference in New Issue
Block a user