Remove COMPILE_CUSTOM_KERNELS env (#4864)
With more and more custom ops merged, disable `COMPILE_CUSTOM_KERNELS `
for vllm ascend seems useless now. Let's enable csrc compile by default.
- vLLM version: v0.12.0
- vLLM main:
ad32e3e19c
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
12
setup.py
12
setup.py
@@ -165,16 +165,10 @@ def gen_build_info():
|
||||
assert soc_version in soc_to_device, f"Undefined soc_version: {soc_version}. Please file an issue to vllm-ascend."
|
||||
device_type = soc_to_device[soc_version]
|
||||
|
||||
if device_type == "_310P" and not envs.COMPILE_CUSTOM_KERNELS:
|
||||
raise ValueError(
|
||||
"device type 310P only supports custom kernels. Please set COMPILE_CUSTOM_KERNELS=1 to enable custom kernels."
|
||||
)
|
||||
|
||||
package_dir = os.path.join(ROOT_DIR, "vllm_ascend", "_build_info.py")
|
||||
with open(package_dir, "w+") as f:
|
||||
f.write('# Auto-generated file\n')
|
||||
f.write(f"__device_type__ = '{device_type}'\n")
|
||||
f.write(f"__sleep_mode_enabled__ = {envs.COMPILE_CUSTOM_KERNELS}\n")
|
||||
logging.info(f"Generated _build_info.py with SOC version: {soc_version}")
|
||||
|
||||
|
||||
@@ -357,8 +351,6 @@ class cmake_build_ext(build_ext):
|
||||
)
|
||||
|
||||
def build_extensions(self) -> None:
|
||||
if not envs.COMPILE_CUSTOM_KERNELS:
|
||||
return
|
||||
# Ensure that CMake is present and working
|
||||
try:
|
||||
subprocess.check_output(["cmake", "--version"])
|
||||
@@ -450,9 +442,7 @@ except LookupError:
|
||||
# only checks out the commit. In this case, we set a dummy version.
|
||||
VERSION = "0.0.0"
|
||||
|
||||
ext_modules = []
|
||||
if envs.COMPILE_CUSTOM_KERNELS:
|
||||
ext_modules = [CMakeExtension(name="vllm_ascend.vllm_ascend_C")]
|
||||
ext_modules = [CMakeExtension(name="vllm_ascend.vllm_ascend_C")]
|
||||
|
||||
|
||||
def get_path(*filepath) -> str:
|
||||
|
||||
Reference in New Issue
Block a user