Skip to content

Commit 6de9144

Browse files
842974287lulmer
authored andcommitted
[Misc] AMD Build Improvements (vllm-project#12923)
Signed-off-by: Louis Ulmer <[email protected]>
1 parent b0adb6a commit 6de9144

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

csrc/moe/moe_align_sum_kernels.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <c10/cuda/CUDAGuard.h>
44

55
#include <ATen/ATen.h>
6-
#include <THC/THCAtomics.cuh>
6+
#include <ATen/cuda/Atomic.cuh>
77

88
#include "../cuda_compat.h"
99
#include "../dispatch_utils.h"

csrc/rocm/attention.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,4 +1122,4 @@ void paged_attention(
11221122
#undef WARP_SIZE
11231123
#undef MAX
11241124
#undef MIN
1125-
#undef DIVIDE_ROUND_UP
1125+
#undef DIVIDE_ROUND_UP

vllm/model_executor/models/registry.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@
205205
**_FALLBACK_MODEL,
206206
}
207207

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

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

503511
# cannot use `sys.executable __file__` here because the script
504512
# contains relative imports
505-
returned = subprocess.run(
506-
[sys.executable, "-m", "vllm.model_executor.models.registry"],
507-
input=input_bytes,
508-
capture_output=True)
513+
returned = subprocess.run(_SUBPROCESS_COMMAND,
514+
input=input_bytes,
515+
capture_output=True)
509516

510517
# check if the subprocess is successful
511518
try:

vllm/transformers_utils/configs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@
4545
"SolarConfig",
4646
"Telechat2Config",
4747
"UltravoxConfig",
48-
]
48+
]

0 commit comments

Comments
 (0)