Skip to content

Commit

Permalink
enable parallel build
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Oct 10, 2024
1 parent a41a4b7 commit 64c3a8e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cuda_core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

import os

from Cython.Build import cythonize
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext as _build_ext


ext_modules = (
Expand All @@ -25,6 +28,13 @@
)


class build_ext(_build_ext):

def build_extensions(self):
self.parallel = os.cpu_count() // 2
super().build_extensions()


setup(
ext_modules=cythonize(ext_modules,
verbose=True, language_level=3,
Expand All @@ -34,5 +44,6 @@
find_packages(include=["cuda.core.*"]),
["*.pxd", "*.pyx", "*.py"],
),
cmdclass = {'build_ext': build_ext,},
zip_safe=False,
)

0 comments on commit 64c3a8e

Please sign in to comment.