diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c3bb5f6687..6bf27e52fdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -348,7 +348,7 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_CUDA_STANDARD 17) # CXX flags -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-free-nonheap-object -Wno-unused-variable -Wno-unused-function -Wno-strict-overflow -fno-strict-aliasing -fPIC -fvisibility=hidden") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-free-nonheap-object -Wno-unused-variable -Wno-unused-function -Wno-strict-overflow -Wno-array-bounds -fno-strict-aliasing -fPIC -fvisibility=hidden") if (WERROR) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") diff --git a/dali/kernels/test/scatter_gather_test.cc b/dali/kernels/test/scatter_gather_test.cc index ed521f273fc..67a47059d3e 100644 --- a/dali/kernels/test/scatter_gather_test.cc +++ b/dali/kernels/test/scatter_gather_test.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include "dali/core/cuda_error.h" #include "dali/core/mm/memory.h" @@ -132,8 +133,10 @@ class ScatterGatherTest : public testing::Test { j += l; } - std::random_shuffle(ranges.begin(), ranges.end()); - std::random_shuffle(back_ranges.begin(), back_ranges.end()); + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(ranges.begin(), ranges.end(), g); + std::shuffle(back_ranges.begin(), back_ranges.end(), g); this->template Memcpy(in_ptr.get(), in.data(), in.size(), cudaMemcpyHostToDevice); this->template Memset(out_ptr.get(), 0, out.size()); diff --git a/dali/operators/image/crop/bbox_crop.cc b/dali/operators/image/crop/bbox_crop.cc index 1ba471009aa..987775d1ec1 100644 --- a/dali/operators/image/crop/bbox_crop.cc +++ b/dali/operators/image/crop/bbox_crop.cc @@ -678,7 +678,9 @@ class RandomBBoxCropImpl : public OpImplBase { std::array order; std::iota(order.begin(), order.end(), 0); - std::random_shuffle(order.begin(), order.end()); + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(order.begin(), order.end(), g); float max_extent = 0.0f; for (int d = 0; d < ndim; d++) { diff --git a/dali/operators/reader/video_reader_decoder_op_test.cc b/dali/operators/reader/video_reader_decoder_op_test.cc index bef91ce554d..c0ae019c58b 100644 --- a/dali/operators/reader/video_reader_decoder_op_test.cc +++ b/dali/operators/reader/video_reader_decoder_op_test.cc @@ -137,6 +137,7 @@ class VideoReaderDecoderBaseTest : public VideoTestBase { pipe.Build({{"frames", backend}}); + // ToFix std::vector expected_order = {29, 46, 33, 6, 37}; int num_sequences = 5; diff --git a/dali/pipeline/executor/executor_test.cc b/dali/pipeline/executor/executor_test.cc index 85997b0f7e1..18c44e9c3c0 100644 --- a/dali/pipeline/executor/executor_test.cc +++ b/dali/pipeline/executor/executor_test.cc @@ -166,6 +166,15 @@ TYPED_TEST(ExecutorTest, DISABLED_TestDataSetup) { vector outputs = {"data3_gpu"}; exe->Build(&graph, outputs); +#pragma GCC diagnostic push +// most recent gcc seems to be incorrectly report this as being null in this test +#if defined(__has_warning) + #if __has_warning("-Wnonnull") + #pragma GCC diagnostic ignored "-Wnonnull" + #endif +#else + #pragma GCC diagnostic ignored "-Wnonnull" +#endif // Verify the data has been setup correctly for (int i = 0; i < 2; ++i) { auto host_workspaces = this->CPUData(exe.get(), i); @@ -193,6 +202,7 @@ TYPED_TEST(ExecutorTest, DISABLED_TestDataSetup) { ASSERT_EQ(dws.NumOutput(), 1); ASSERT_TRUE(dws.OutputIsType(0)); } +#pragma GCC diagnostic pop } TYPED_TEST(ExecutorTest, TestRunBasicGraph) { diff --git a/docker/Dockerfile b/docker/Dockerfile index 9283eee6ef3..4287f5c3f2b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,9 +13,9 @@ ENV PYVER=${PYVER} \ PYTHONPATH=/opt/python/v \ PYBIN=${PYTHONPATH}/bin \ PYLIB=${PYTHONPATH}/lib \ - PATH=/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:${PYBIN}:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:${PYBIN}:/opt/python/cp312-cp312/bin:${PYBIN}:${PATH} \ - LD_LIBRARY_PATH=/usr/local/lib:/opt/dali/${DALI_BUILD_DIR}:/opt/python/cp38-cp38/lib:/opt/python/cp39-cp39/lib:/opt/python/cp310-cp310/lib:/opt/python/cp311-cp311/lib:${PYLIB}:/opt/python/cp312-cp312/lib:${PYLIB}:${LD_LIBRARY_PATH} \ - LIBRARY_PATH=/usr/local/lib:/opt/dali/${DALI_BUILD_DIR}:/opt/python/cp38-cp38/lib:/opt/python/cp39-cp39/lib:/opt/python/cp310-cp310/lib:/opt/python/cp311-cp311/lib:${PYLIB}:/opt/python/cp312-cp312/lib:${PYLIB}:${LIBRARY_PATH} + PATH=/opt/python/cp39-cp39/bin:${PYBIN}:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:${PYBIN}:/opt/python/cp312-cp312/bin:${PYBIN}:${PATH} \ + LD_LIBRARY_PATH=/usr/local/lib:/opt/dali/${DALI_BUILD_DIR}:opt/python/cp39-cp39/lib:/opt/python/cp310-cp310/lib:/opt/python/cp311-cp311/lib:${PYLIB}:/opt/python/cp312-cp312/lib:${PYLIB}:${LD_LIBRARY_PATH} \ + LIBRARY_PATH=/usr/local/lib:/opt/dali/${DALI_BUILD_DIR}:/opt/python/cp39-cp39/lib:/opt/python/cp310-cp310/lib:/opt/python/cp311-cp311/lib:${PYLIB}:/opt/python/cp312-cp312/lib:${PYLIB}:${LIBRARY_PATH} RUN ln -s /opt/python/cp${PYV}* /opt/python/v diff --git a/docker/Dockerfile.cuda118.aarch64.deps b/docker/Dockerfile.cuda118.aarch64.deps index 40c99038246..e04c33d13a0 100644 --- a/docker/Dockerfile.cuda118.aarch64.deps +++ b/docker/Dockerfile.cuda118.aarch64.deps @@ -9,7 +9,8 @@ RUN apt update && apt install -y libxml2 curl perl gcc && \ RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux_sbsa.run && \ chmod +x cuda_*.run && \ ./cuda_*.run --silent --no-opengl-libs --toolkit && \ - rm -f cuda_*.run; + rm -f cuda_*.run && \ + sed -i "s/__GNUC__ > 11/__GNUC__ > 13/" /usr/local/cuda/bin/../targets/x86_64-linux/include/crt/host_config.h; RUN NVJPEG2K_VERSION=0.8.0.38-1 && \ CUDA_VERSION_MAJOR=11 && \ diff --git a/docker/Dockerfile.cuda118.x86_64.deps b/docker/Dockerfile.cuda118.x86_64.deps index d65ebdeb097..1cdd3cec721 100644 --- a/docker/Dockerfile.cuda118.x86_64.deps +++ b/docker/Dockerfile.cuda118.x86_64.deps @@ -9,7 +9,8 @@ RUN apt update && apt install -y libxml2 curl perl gcc && \ RUN curl -LO https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run && \ chmod +x cuda_*.run && \ ./cuda_*.run --silent --no-opengl-libs --toolkit && \ - rm -f cuda_*.run; + rm -f cuda_*.run && \ + sed -i "s/__GNUC__ > 11/__GNUC__ > 13/" /usr/local/cuda/bin/../targets/x86_64-linux/include/crt/host_config.h; RUN NVJPEG2K_VERSION=0.8.0.38-1 && \ CUFILE_VERSION=1.4.0.31-1 && \ diff --git a/docker/Dockerfile.deps b/docker/Dockerfile.deps index d5e2ba3c403..fee7e56a7f8 100644 --- a/docker/Dockerfile.deps +++ b/docker/Dockerfile.deps @@ -2,22 +2,19 @@ ## Build DALI dependencies on top of manylinux2014 ## DALI is based on "manylinux2014", official page https://github.com/pypa/manylinux ######################################################################################### -ARG FROM_IMAGE_NAME=quay.io/pypa/manylinux2014_x86_64 +ARG FROM_IMAGE_NAME=quay.io/pypa/manylinux_2_28_x86_64 ARG BUILDER_EXTRA_DEPS=scratch FROM ${BUILDER_EXTRA_DEPS} as extra_deps FROM ${FROM_IMAGE_NAME} # Install yum Dependencies RUN yum install -y wget doxygen graphviz gettext xz openssl autogen zip \ - devtoolset-10-libasan-devel devtoolset-10-liblsan-devel \ - devtoolset-10-libtsan-devel devtoolset-10-libubsan-devel \ - perl perl-IPC-Cmd + gcc-toolset-12-libasan-devel gcc-toolset-12-liblsan-devel \ + gcc-toolset-12-libtsan-devel gcc-toolset-12-libubsan-devel \ + perl perl-IPC-Cmd nasm ENV ACLOCAL_PATH=/usr/share/aclocal/:/usr/local/share/aclocal -# Don't want the short-unicode version for Python 2.7 -RUN rm -f /opt/python/cp27-cp27m - RUN CMAKE_VERSION=3.20.1 && CMAKE_ARCH=$(uname -m) && \ wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.sh && \ test -e /bin/sh || ln -s /usr/bin/sh /bin/sh && \ @@ -25,19 +22,9 @@ RUN CMAKE_VERSION=3.20.1 && CMAKE_ARCH=$(uname -m) && \ ./cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.sh --prefix=/usr/local --skip-license && \ rm -rf cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.sh -# We need newer NASM than manylinux2014 offers -RUN cd /tmp && \ - curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2 && \ - tar xjvf nasm-2.15.05.tar.bz2 && \ - cd nasm-2.15.05 && \ - ./autogen.sh && \ - ./configure && \ - make && \ - make install - # Clang, build it before deps as deps changes more frequently -RUN CLANG_VERSION=15.0.2 && \ - cd /tmp && \ +RUN CLANG_VERSION=17.0.6 && \ + cd /tmp && \ wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${CLANG_VERSION}.tar.gz && \ tar -xf llvmorg-*.tar.gz && \ rm -rf llvmorg-*.tar.gz && \ @@ -47,13 +34,7 @@ RUN CLANG_VERSION=15.0.2 cmake -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm && \ make -j"$(grep ^processor /proc/cpuinfo | wc -l)" install && \ cd /tmp && \ - rm -rf llvm-* && \ - sed -i 's/#if __cplusplus >= 201103L \&\& CUDA_VERSION >= 9000/\#if __cplusplus >= 201103L \&\& CUDA_VERSION >= 9000 \&\& CUDA_VERSION < 12000/g' \ - /usr/local/lib/clang/${CLANG_VERSION}/include/__clang_cuda_runtime_wrapper.h && \ - sed -i -z 's/#if CUDA_VERSION >= 9000\n\/\/ Provide a hint that texture support needs C++11./#if CUDA_VERSION >= 9000 \&\& CUDA_VERSION < 12000\n\/\/ Provide a hint that texture support needs C++11./g' \ - /usr/local/lib/clang/${CLANG_VERSION}/include/__clang_cuda_runtime_wrapper.h && \ - sed -i 's/#include "crt\/device_functions.hpp"/#include "crt\/device_functions.h"/g' \ - /usr/local/lib/clang/${CLANG_VERSION}/include/__clang_cuda_runtime_wrapper.h + rm -rf llvm-* COPY DALI_DEPS_VERSION /tmp diff --git a/include/dali/core/small_vector.h b/include/dali/core/small_vector.h index f2927e7acc6..ba9870675b7 100644 --- a/include/dali/core/small_vector.h +++ b/include/dali/core/small_vector.h @@ -23,6 +23,16 @@ #include "dali/core/util.h" #include "dali/core/cuda_utils.h" +#pragma GCC diagnostic push +// most recent gcc seems to be confused by some things in small vector raising false warnings +#if defined(__has_warning) + #if __has_warning("-Wuse-after-free") + #pragma GCC diagnostic ignored "-Wuse-after-free" + #endif +#else + #pragma GCC diagnostic ignored "-Wuse-after-free" +#endif + namespace dali { template ::value> @@ -732,4 +742,6 @@ class SmallVector : SmallVectorAlloc, SmallVectorBase { } // namespace dali +#pragma GCC diagnostic pop + #endif // DALI_CORE_SMALL_VECTOR_H_ diff --git a/third_party/ffts b/third_party/ffts index c9a9f61a605..95489ebcd6f 160000 --- a/third_party/ffts +++ b/third_party/ffts @@ -1 +1 @@ -Subproject commit c9a9f61a60505751cac385ed062ce2720bdf07d4 +Subproject commit 95489ebcd6fc136c6a76f50f57d43e6072e2bd38