Skip to content

Commit

Permalink
[CI/Build] CMakeLists: build all extension cmake targets at the same …
Browse files Browse the repository at this point in the history
…time
  • Loading branch information
dtrifiro committed May 27, 2024
1 parent 6a50f4c commit 7249850
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,22 @@ def build_extensions(self) -> None:
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)

targets = []
# Build all the extensions
for ext in self.extensions:
self.configure(ext)
targets.append(remove_prefix(ext.name, "vllm."))

ext_target_name = remove_prefix(ext.name, "vllm.")
num_jobs, _ = self.compute_num_jobs()
num_jobs, _ = self.compute_num_jobs()

build_args = [
'--build', '.', '--target', ext_target_name, '-j',
str(num_jobs)
]
build_args = [
"--build",
".",
f"-j={num_jobs}",
*[f"--target={name}" for name in targets],
]

subprocess.check_call(['cmake', *build_args], cwd=self.build_temp)
subprocess.check_call(["cmake", *build_args], cwd=self.build_temp)


def _is_cuda() -> bool:
Expand Down

0 comments on commit 7249850

Please sign in to comment.