Skip to content

Commit

Permalink
[Misc] AMD Build Improvements (vllm-project#12923)
Browse files Browse the repository at this point in the history
  • Loading branch information
842974287 authored and I746365 committed Feb 15, 2025
1 parent a91bfba commit e20e333
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion csrc/moe/moe_align_sum_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <c10/cuda/CUDAGuard.h>

#include <ATen/ATen.h>
#include <THC/THCAtomics.cuh>
#include <ATen/cuda/Atomic.cuh>

#include "../cuda_compat.h"
#include "../dispatch_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion csrc/rocm/attention.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1122,4 +1122,4 @@ void paged_attention(
#undef WARP_SIZE
#undef MAX
#undef MIN
#undef DIVIDE_ROUND_UP
#undef DIVIDE_ROUND_UP
15 changes: 11 additions & 4 deletions vllm/model_executor/models/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@
**_FALLBACK_MODEL,
}

# This variable is used as the args for subprocess.run(). We
# can modify this variable to alter the args if needed. e.g.
# when we use par format to pack things together, sys.executable
# might not be the target we want to run.
_SUBPROCESS_COMMAND = [
sys.executable, "-m", "vllm.model_executor.models.registry"
]


@dataclass(frozen=True)
class _ModelInfo:
Expand Down Expand Up @@ -502,10 +510,9 @@ def _run_in_subprocess(fn: Callable[[], _T]) -> _T:

# cannot use `sys.executable __file__` here because the script
# contains relative imports
returned = subprocess.run(
[sys.executable, "-m", "vllm.model_executor.models.registry"],
input=input_bytes,
capture_output=True)
returned = subprocess.run(_SUBPROCESS_COMMAND,
input=input_bytes,
capture_output=True)

# check if the subprocess is successful
try:
Expand Down
2 changes: 1 addition & 1 deletion vllm/transformers_utils/configs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"SolarConfig",
"Telechat2Config",
"UltravoxConfig",
]
]

0 comments on commit e20e333

Please sign in to comment.