Use self.parallel
import argparse
import copy
-import multiprocessing
from distutils import ccompiler
from distutils import errors
from distutils import msvccompiler
@@ -1052,7 +1051,6 @@ class custom_build_ext(build_ext.build_ext):
build_ext.build_ext.run(self)
def build_extensions(self):
- self.check_extensions_list(self.extensions)
num_jobs = int(os.environ.get('CUPY_NUM_BUILD_JOBS', '4'))
- with multiprocessing.Pool(num_jobs) as pool:
- pool.map(self.build_extension, self.extensions)
+ self.parallel = num_jobs
+ super().build_extensions()
