Skip to content

Commit 9396364

Browse files
committed
undo random changes
Signed-off-by: Bill Nell <[email protected]>
1 parent a876454 commit 9396364

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

csrc/custom_all_reduce.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,4 @@ class CustomAllreduce {
602602
* template void vllm::CustomAllreduce::allreduce<half>(cudaStream_t, half *,
603603
half *, int, int, int);
604604
*/
605-
} // namespace vllm
605+
} // namespace vllm

vllm/distributed/parallel_state.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535
import torch
3636
import torch.distributed
37-
from torch.distributed import Backend, ProcessGroup
3837
from pplx_kernels.nvshmem import (nvshmem_alloc_empty_unique_id,
39-
nvshmem_get_unique_id, nvshmem_init,
40-
nvshmem_finalize)
38+
nvshmem_finalize, nvshmem_get_unique_id,
39+
nvshmem_init)
40+
from torch.distributed import Backend, ProcessGroup
4141

4242
import vllm.envs as envs
4343
from vllm.distributed.device_communicators.base_device_communicator import (
@@ -917,6 +917,7 @@ def init_distributed_environment(
917917

918918
PPLX_DID_INIT: bool = False
919919

920+
920921
@run_once
921922
def pplx_init(rank, world_size):
922923
if world_size > 1:
@@ -1131,7 +1132,6 @@ def destroy_model_parallel():
11311132
_DP = None
11321133

11331134

1134-
11351135
def destroy_distributed_environment():
11361136
global _WORLD
11371137
if _WORLD:

vllm/model_executor/models/mllama.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,31 +1245,6 @@ def unpack_data(self,
12451245
output_tensor[i, :t.size(0)] = t
12461246
return output_tensor
12471247

1248-
def unpack_data(self,
1249-
image_data: Union[List[torch.Tensor], torch.Tensor],
1250-
padding_value=0) -> torch.Tensor:
1251-
if isinstance(image_data, torch.Tensor):
1252-
# torch.Tensor
1253-
return image_data
1254-
else:
1255-
assert isinstance(
1256-
image_data[0],
1257-
torch.Tensor), "Image data is not properly batched."
1258-
# List[torch.Tensor]
1259-
bsz = len(image_data)
1260-
max_length = max(t.size(0) for t in image_data)
1261-
trailing_dims = image_data[0].shape[1:]
1262-
for data in image_data:
1263-
cur_trailing_dims = data.shape[1:]
1264-
assert cur_trailing_dims == trailing_dims
1265-
output_tensor = torch.full((bsz, max_length, *trailing_dims),
1266-
padding_value,
1267-
dtype=image_data[0].dtype,
1268-
device=image_data[0].device)
1269-
for i, t in enumerate(image_data):
1270-
output_tensor[i, :t.size(0)] = t
1271-
return output_tensor
1272-
12731248
def _parse_and_validate_image_input(self, **kwargs: object):
12741249
# tensor with the same shape will be batched together by
12751250
# MultiModalKwargs.batch, so pixel_values here can be:

0 commit comments

Comments
 (0)