A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 00:30 UTC
[CI/Build] CMakeLists: build all extensions' cmake targets at the same time (#5034)
Daniele committed
Jun 1, 2024 at 06:06 UTC
a360ff80bb34f9dfcd21cf880c2030daa2d6b3a3
1 file changed
+10
-7
setup.py
+10
-7
@@ -187,19 +187,22 @@ class cmake_build_ext(build_ext):
187
if not os.path.exists(self.build_temp):
188
os.makedirs(self.build_temp)
189
190
+ targets = []
191
# Build all the extensions
192
for ext in self.extensions:
193
self.configure(ext)
194
+ targets.append(remove_prefix(ext.name, "vllm."))
195
194
- ext_target_name = remove_prefix(ext.name, "vllm.")
195
- num_jobs, _ = self.compute_num_jobs()
196
+ num_jobs, _ = self.compute_num_jobs()
197
197
- build_args = [
198
- '--build', '.', '--target', ext_target_name, '-j',
199
- str(num_jobs)
200
- ]
198
+ build_args = [
199
+ "--build",
200
+ ".",
201
+ f"-j={num_jobs}",
202
+ *[f"--target={name}" for name in targets],
203
+ ]
204
202
- subprocess.check_call(['cmake', *build_args], cwd=self.build_temp)
205
+ subprocess.check_call(["cmake", *build_args], cwd=self.build_temp)
206
207
208
def _is_cuda() -> bool: