Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moves to manylinux_2_28 #5608

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 5 additions & 2 deletions dali/kernels/test/scatter_gather_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <gtest/gtest.h>
#include <vector>
#include <algorithm>
#include <random>

#include "dali/core/cuda_error.h"
#include "dali/core/mm/memory.h"
Expand Down Expand Up @@ -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<kind>(in_ptr.get(), in.data(), in.size(), cudaMemcpyHostToDevice);
this->template Memset<kind>(out_ptr.get(), 0, out.size());
Expand Down
4 changes: 3 additions & 1 deletion dali/operators/image/crop/bbox_crop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ class RandomBBoxCropImpl : public OpImplBase<CPUBackend> {

std::array<int, ndim> 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++) {
Expand Down
10 changes: 10 additions & 0 deletions dali/pipeline/executor/executor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ TYPED_TEST(ExecutorTest, DISABLED_TestDataSetup) {
vector<string> 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);
Expand Down Expand Up @@ -193,6 +202,7 @@ TYPED_TEST(ExecutorTest, DISABLED_TestDataSetup) {
ASSERT_EQ(dws.NumOutput(), 1);
ASSERT_TRUE(dws.OutputIsType<GPUBackend>(0));
}
#pragma GCC diagnostic pop
}

TYPED_TEST(ExecutorTest, TestRunBasicGraph) {
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 10 additions & 26 deletions docker/Dockerfile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,32 @@
## 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}

ENV PATH=/opt/rh/gcc-toolset-11/root/usr/bin:$PATH

# 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-11 \
gcc-toolset-11-libasan-devel gcc-toolset-11-liblsan-devel \
gcc-toolset-11-libtsan-devel gcc-toolset-11-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 && \
chmod +x cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.sh && \
./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 && \
Expand All @@ -47,13 +37,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

Expand Down
6 changes: 3 additions & 3 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BUILD_INHOST=[create build dir with object outside docker, just mount it as a vo
REBUILD_BUILDERS=[default is NO]
DALI_BUILD_DIR=[default is build-docker-\${CMAKE_BUILD_TYPE}-\${CUDA_VERSION}]
ARCH=[default is x86_64]
WHL_PLATFORM_NAME=[default is manylinux2014_x86_64]
WHL_PLATFORM_NAME=[default is manylinux_2_28_x86_64]
BUILDER_EXTRA_DEPS=[default is scratch]

where:
Expand Down Expand Up @@ -69,10 +69,10 @@ export REBUILD_BUILDERS=${REBUILD_BUILDERS:-NO}
export BUILD_TF_PLUGIN=${BUILD_TF_PLUGIN:-NO}
export PREBUILD_TF_PLUGINS=${PREBUILD_TF_PLUGINS:-YES}
export DALI_BUILD_DIR=${DALI_BUILD_DIR:-build-docker-${CMAKE_BUILD_TYPE}-${CUDA_VER}}_${ARCH}
export WHL_PLATFORM_NAME=${WHL_PLATFORM_NAME:-manylinux2014_${ARCH}}
export WHL_PLATFORM_NAME=${WHL_PLATFORM_NAME:-manylinux_2_28_${ARCH}}
export WHL_COMPRESSION=${WHL_COMPRESSION:-YES}
#################################
export BASE_NAME=quay.io/pypa/manylinux2014_${ARCH}
export BASE_NAME=quay.io/pypa/manylinux_2_28_${ARCH}
export DEPS_IMAGE=nvidia/dali:${ARCH}.deps
export CUDA_DEPS_IMAGE=nvidia/dali:cu${CUDA_VER}_${ARCH}.deps
export CUDA_TOOLKIT_IMAGE=nvidia/dali:cuda${CUDA_VER}_${ARCH}.toolkit
Expand Down
14 changes: 14 additions & 0 deletions include/dali/core/small_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
#include "dali/core/util.h"
#include "dali/core/cuda_utils.h"

#pragma GCC diagnostic push
#if __GNUC__ > 11
// 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
#endif

namespace dali {

template <typename T, typename Allocator, bool Contextless = std::is_empty<Allocator>::value>
Expand Down Expand Up @@ -732,4 +744,6 @@ class SmallVector : SmallVectorAlloc<T, allocator>, SmallVectorBase<T> {

} // namespace dali

#pragma GCC diagnostic pop

#endif // DALI_CORE_SMALL_VECTOR_H_
2 changes: 1 addition & 1 deletion third_party/ffts
Submodule ffts updated 1 files
+3 −3 src/ffts.c
Loading