[Misc] AMD Build Improvements (#12923)

This commit is contained in:
Shiyan Deng 2025-02-12 02:36:10 -08:00 committed by GitHub
parent 7c4033acd4
commit f1042e86f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 7 deletions

View File

@ -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"

View File

@ -1122,4 +1122,4 @@ void paged_attention(
#undef WARP_SIZE
#undef MAX
#undef MIN
#undef DIVIDE_ROUND_UP
#undef DIVIDE_ROUND_UP

View File

@ -205,6 +205,14 @@ _VLLM_MODELS = {
**_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:
@ -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:

View File

@ -45,4 +45,4 @@ __all__ = [
"SolarConfig",
"Telechat2Config",
"UltravoxConfig",
]
]