cythonファイルのコンパイルを並行して実行したいと思います。
そこで、Cython.Buildソース ファイルを調べたところ、次のcythonize関数のシグネチャが見つかりました。
def cythonize(module_list, exclude=None, nthreads=0, aliases=None,
quiet=False, force=False, language=None,
exclude_failures=False, **options):
そして、cythonizenthreadsオプションに関する次のコメント:
"For parallel compilation, set the 'nthreads' option to the number of
concurrent builds."
setup.pyそのため、次のように、ファイルでこのオプションを使用しようとしました。
from setuptools import setup
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
EXTENSIONS = [Extension(...)
...
Extension(...)]
setup(name='...',
...
ext_modules=cythonize(EXTENSIONS, nthreads=8),
...)
しかし、私の.pyxファイルはまだ 1 つのスレッドを使用して順次コンパイルされています。
nthreadsここで間違っていることと、オプションを使用してcythonizeコンパイルを並行して実行する方法がわかりませんか?