Skip to content

Commit 892bf67

Browse files
committed
use openmp threading instead of tbb
1 parent 89a3354 commit 892bf67

5 files changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/build-with-standard-clang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install mkl_umath dependencies
4848
run: |
4949
pip install meson-python ninja cython mkl-service
50-
pip install mkl-devel tbb-devel
50+
pip install mkl-devel
5151
pip install ${{ matrix.numpy_version }}
5252
5353
- name: Build mkl_umath

.github/workflows/build_pip.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Install Compiler and MKL
4444
run: |
45-
conda install mkl-devel tbb-devel dpcpp_linux-64
45+
conda install mkl-devel dpcpp_linux-64
4646
python -c "import sys; print(sys.executable)"
4747
which python
4848

conda-recipe-cf/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ requirements:
2929
- python-gil # [py>=314]
3030
- python-build
3131
- mkl-devel
32-
- tbb-devel
3332
- numpy
3433
- wheel >=0.41.3
3534
- pip

conda-recipe/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ requirements:
2929
- python-gil # [py>=314]
3030
- python-build
3131
- mkl-devel
32-
- tbb-devel
3332
- numpy-base
3433
- wheel >=0.41.3
3534
- pip

meson.build

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ else
7373
endif
7474

7575
# dependencies
76-
tbb_dep = dependency('tbb', required: true)
76+
omp_dep = dependency('openmp', required: true)
7777

7878
# manually waterfall the meson deps: pkg-config to cmake to find_library
79-
mkl_dep = dependency('mkl-dynamic-lp64-tbb', required: false)
79+
mkl_dep = dependency('mkl-dynamic-lp64-iomp', required: false)
8080

8181
if not mkl_dep.found()
8282
mkl_dep = dependency('MKL', method: 'cmake',
8383
modules: ['MKL::MKL'],
8484
cmake_args: [
8585
'-DMKL_ARCH=intel64',
8686
'-DMKL_LINK=dynamic',
87-
'-DMKL_THREADING=tbb_thread',
87+
'-DMKL_THREADING=intel_thread',
8888
'-DMKL_INTERFACE=lp64'
8989
],
9090
required: false
@@ -97,8 +97,8 @@ if not mkl_dep.found()
9797
# see: https://github.com/mesonbuild/meson/issues/14163
9898
mkl_core = cc.find_library('mkl_core', required: true, static: false)
9999
mkl_intel_lp64 = cc.find_library('mkl_intel_lp64', required: true, static: false)
100-
mkl_tbb_thread = cc.find_library('mkl_tbb_thread', required: true, static: false)
101-
mkl_dep = declare_dependency(dependencies: [mkl_core, mkl_intel_lp64, mkl_tbb_thread])
100+
mkl_intel_thread = cc.find_library('mkl_intel_thread', required: true, static: false)
101+
mkl_dep = declare_dependency(dependencies: [mkl_core, mkl_intel_lp64, mkl_intel_thread])
102102
endif
103103

104104
# generate loops, similar to numpy
@@ -131,7 +131,7 @@ mkl_umath_loops = shared_library(
131131
'mkl_umath_loops',
132132
sources: [gen_loops_c, gen_loops_h],
133133
include_directories: inc_np,
134-
dependencies: [mkl_dep, tbb_dep, py_dep],
134+
dependencies: [mkl_dep, omp_dep, py_dep],
135135
c_args: c_args,
136136
link_args: link_args,
137137
install: true,
@@ -152,7 +152,7 @@ py.extension_module(
152152
'_ufuncs',
153153
sources: ['mkl_umath/src/ufuncsmodule.c', gen_loops_h],
154154
include_directories: inc_np,
155-
dependencies: [mkl_dep, tbb_dep, loops_dep],
155+
dependencies: [mkl_dep, omp_dep, loops_dep],
156156
c_args: c_args + ['-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'],
157157
link_args: link_args,
158158
install_rpath: ext_rpath,

0 commit comments

Comments
 (0)