Skip to content

Commit 5e5cc5b

Browse files
authored
Merge pull request #200 from alicevision/dev/update_oneAPI
Use TBB oneAPI
2 parents fb7d578 + 105e595 commit 5e5cc5b

File tree

15 files changed

+82
-552
lines changed

15 files changed

+82
-552
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
build:
2121
runs-on: ubuntu-latest
2222
container:
23-
image: alicevision/cctag-deps:cuda10.2-ubuntu18.04
23+
image: alicevision/cctag-deps:cuda11.8.0-ubuntu20.04
2424
env:
2525
DEPS_INSTALL_DIR: /opt/
2626
BUILD_TYPE: Release

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Changed
1515

1616
- Replaced CCTAG_EIGEN_MEMORY_ALIGNMENT with CCTAG_EIGEN_MEMORY_ALIGNMENT which has the opposite meaning.
17+
- Using the new TBB oneAPI interface, this breaks compatibility with previous versions of TBB [PR](https://github.com/alicevision/CCTag/pull/200)
1718

1819
### Fixed
1920
- fix gcc11 ordered pointer comparison [PR](https://github.com/alicevision/CCTag/pull/191)

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ if(CCTAG_BUILD_TESTS)
124124
endif()
125125

126126
find_package(Boost 1.66.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
127+
message(STATUS "Found Boost: version ${Boost_VERSION}")
127128

128129
if(BUILD_SHARED_LIBS)
129130
if(WIN32)
@@ -239,7 +240,8 @@ endif()
239240
# FIND Intel TBB
240241
# With MVSC, CMAKE_BUILD_TYPE will always be None, so TBB_USE_DEBUG_BUILD will always be false.
241242
string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" Debug TBB_USE_DEBUG_BUILD)
242-
find_package(TBB REQUIRED)
243+
find_package(TBB 2021.5.0 CONFIG REQUIRED)
244+
message(STATUS "Found TBB: version ${TBB_VERSION}")
243245

244246
add_subdirectory(src)
245247

Dockerfile_deps

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LABEL maintainer="AliceVision Team [email protected]"
1717
# Cuda version (ENV): $CUDA_VERSION
1818

1919
# System update
20-
RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \
20+
RUN apt-get clean && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
2121
build-essential \
2222
wget \
2323
unzip \
@@ -33,16 +33,15 @@ RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommend
3333
libavformat-dev \
3434
libswscale-dev \
3535
libavresample-dev \
36-
libtbb-dev \
3736
&& rm -rf /var/lib/apt/lists/*
3837

3938
ENV DEPS_INSTALL_PATH="/opt"
4039

4140
# Manually install cmake
4241
WORKDIR /tmp/cmake
43-
ENV CMAKE_VERSION=3.17
42+
ENV CMAKE_VERSION=3.24
4443
ENV CMAKE_VERSION_FULL=${CMAKE_VERSION}.2
45-
RUN wget https://cmake.org/files/v3.17/cmake-${CMAKE_VERSION_FULL}.tar.gz && \
44+
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION_FULL}.tar.gz && \
4645
tar zxf cmake-${CMAKE_VERSION_FULL}.tar.gz && \
4746
cd cmake-${CMAKE_VERSION_FULL} && \
4847
./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON && \
@@ -51,8 +50,8 @@ RUN wget https://cmake.org/files/v3.17/cmake-${CMAKE_VERSION_FULL}.tar.gz && \
5150
rm -rf cmake
5251

5352

54-
ENV BOOST_VERSION="1.70.0"
55-
ENV BOOST_VERSION_FILENAME="1_70_0"
53+
ENV BOOST_VERSION="1.76.0"
54+
ENV BOOST_VERSION_FILENAME="1_76_0"
5655
WORKDIR /tmp/boost
5756
RUN wget https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_FILENAME}.tar.gz && \
5857
tar -xzf boost_${BOOST_VERSION_FILENAME}.tar.gz && \
@@ -63,7 +62,7 @@ RUN wget https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boo
6362
rm -rf /tmp/boost
6463

6564
WORKDIR /tmp/eigen
66-
ENV EIGEN_VERSION="3.3.7"
65+
ENV EIGEN_VERSION="3.4.0"
6766
RUN wget https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/${EIGEN_VERSION}.tar.gz && \
6867
mkdir eigen-${EIGEN_VERSION} && tar xf ${EIGEN_VERSION}.tar.gz -C eigen-${EIGEN_VERSION} --strip-components 1 && \
6968
cd eigen-${EIGEN_VERSION} && \
@@ -75,7 +74,7 @@ RUN wget https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/${EIGEN_VE
7574
rm -rf /tmp/eigen
7675

7776
# install opencv
78-
ENV OPENCV_VERSION="3.4.10"
77+
ENV OPENCV_VERSION="4.5.3"
7978
WORKDIR /tmp/opencv
8079
RUN wget https://github.com/opencv/opencv/archive/"${OPENCV_VERSION}".zip && \
8180
unzip ${OPENCV_VERSION}.zip && \
@@ -84,16 +83,36 @@ RUN wget https://github.com/opencv/opencv/archive/"${OPENCV_VERSION}".zip && \
8483
cmake -DBUILD_TIFF:BOOL=ON \
8584
-DBUILD_opencv_java:BOOL=OFF \
8685
-DWITH_CUDA:BOOL=OFF \
86+
-DINSTALL_C_EXAMPLES=OFF \
87+
-DINSTALL_PYTHON_EXAMPLES=OFF \
8788
-DENABLE_AVX:BOOL=ON \
88-
-DWITH_OPENGL:BOOL=ON \
89-
-DWITH_IPP:BOOL=ON \
90-
-DWITH_TBB:BOOL=ON \
89+
-DWITH_OPENGL:BOOL=OFF \
90+
-DWITH_TBB:BOOL=OFF \
9191
-DWITH_EIGEN:BOOL=ON \
9292
-DWITH_V4L:BOOL=ON \
9393
-DBUILD_TESTS:BOOL=OFF \
94+
-DBUILD_EXAMPLES=OFF \
9495
-DBUILD_PERF_TESTS:BOOL=OFF \
96+
-DDBUILD_SHARED_LIBS=ON \
97+
-DBUILD_LIST=core,videoio,imgproc,imgcodecs,highgui \
9598
-DCMAKE_INSTALL_PREFIX:PATH=${DEPS_INSTALL_PATH} \
9699
-DCMAKE_BUILD_TYPE=RELEASE .. && \
97100
make -j$(nproc) install && \
98101
cd /opt && \
99-
rm -r /tmp/opencv
102+
rm -r /tmp/opencv
103+
104+
# install tbb
105+
ENV TBB_VERSION="2021.5.0"
106+
WORKDIR /tmp/tbb
107+
RUN wget https://github.com/oneapi-src/oneTBB/archive/refs/tags/v"${TBB_VERSION}".zip && \
108+
unzip v${TBB_VERSION}.zip && \
109+
mkdir -p ./oneTBB-${TBB_VERSION}/build && \
110+
cd ./oneTBB-${TBB_VERSION}/build && \
111+
cmake -DTBB_TEST:BOOL=OFF \
112+
-DTBB_STRICT:BOOL=OFF \
113+
-DBUILD_SHARED_LIBS:BOOL=ON \
114+
-DCMAKE_INSTALL_PREFIX:PATH=${DEPS_INSTALL_PATH} \
115+
-DCMAKE_BUILD_TYPE=RELEASE .. && \
116+
make -j$(nproc) install && \
117+
cd /opt && \
118+
rm -r /tmp/tbb

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Most of the dependencies can be installed from the common repositories (apt, yum
2222
- Eigen3 (libeigen3-dev) >= 3.3.4 (NOTE: in order to have Cuda support on Windows, at least version 3.3.9 is required)
2323
- Boost >= 1.66 ([accumulators, atomic, chrono, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, stacktrace, timer, thread]-dev)
2424
- OpenCV >= 3.1
25-
- TBB >= 4.0
25+
- TBB >= 2021.5.0
2626

2727

2828
----------

appveyor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ configuration:
1111
install:
1212
# - cmd: >-
1313
# call cudaInstallAppveyor.cmd
14+
- cd C:\Tools\vcpkg
15+
- git pull
16+
- git checkout 2022.09.27
17+
- .\bootstrap-vcpkg.bat
18+
- cd %APPVEYOR_BUILD_FOLDER%
19+
1420

1521
- vcpkg upgrade --no-dry-run
1622
- vcpkg list

cmake/Config.cmake.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@
4242
include(CMakeFindDependencyMacro)
4343

4444
set(OpenCV_DIR @OpenCV_DIR@)
45-
find_dependency(OpenCV)
45+
find_dependency(OpenCV @OPENCV_VERSION@)
46+
find_dependency(TBB @TBB_VERSION@)
4647
find_dependency(Eigen3 @CCTAG_EIGEN_REQUIRED_VERSION@)
47-
find_dependency(Boost 1.66 REQUIRED COMPONENTS @BOOST_REQUIRED_COMPONENTS@)
48+
find_dependency(Boost @Boost_VERSION@ REQUIRED COMPONENTS @BOOST_REQUIRED_COMPONENTS@)
4849

4950
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
5051
check_required_components("@PROJECT_NAME@")

0 commit comments

Comments
 (0)