[Hardware][Neuron] Refactor neuron support (#3471)
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
from typing import List, Optional
|
||||
|
||||
import torch
|
||||
from vllm.utils import in_wsl
|
||||
from vllm.utils import is_pin_memory_available
|
||||
|
||||
|
||||
class LoRALayerWeights:
|
||||
@@ -64,7 +64,7 @@ class LoRALayerWeights:
|
||||
dtype: torch.dtype,
|
||||
device: torch.device,
|
||||
embeddings_tensor_dim: Optional[int] = None) -> "LoRALayerWeights":
|
||||
pin_memory = str(device) == "cpu" and not in_wsl()
|
||||
pin_memory = str(device) == "cpu" and is_pin_memory_available()
|
||||
lora_a = torch.zeros([input_dim, rank],
|
||||
dtype=dtype,
|
||||
device=device,
|
||||
|
||||
Reference in New Issue
Block a user