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

Fix memory_resource compilation in conda build #4939

Merged
merged 2 commits into from
Jul 10, 2023
Merged
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
4 changes: 2 additions & 2 deletions conda/recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fi
ln -s $CC $BUILD_PREFIX/bin/gcc
ln -s $CXX $BUILD_PREFIX/bin/g++

# Force -std=c++14 in CXXFLAGS
export CXXFLAGS=${CXXFLAGS/-std=c++??/-std=c++14}
# Force -std=c++17 in CXXFLAGS
export CXXFLAGS=${CXXFLAGS/-std=c++??/-std=c++17}

# For some reason `aligned_alloc` is present when we use compiler version 5.4.x
# Adding NO_ALIGNED_ALLOC definition for cutt
Expand Down
11 changes: 5 additions & 6 deletions include/dali/core/mm/cuda_memory_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@
#include <typeinfo>
#endif

// #if __has_include(<memory_resource>)
#if __has_include(<memory_resource>)
#include <memory_resource>
#define _DALI_STD_PMR_NS ::std::pmr
// #elif __has_include(<experimental/memory_resource>)
// #include <experimental/memory_resource>
// #define _DALI_STD_PMR_NS ::std::experimental::pmr
// #endif // __has_include(<experimental/memory_resource>)

#elif __has_include(<experimental/memory_resource>)
#include <experimental/memory_resource>
#define _DALI_STD_PMR_NS ::std::experimental::pmr
#endif // __has_include(<experimental/memory_resource>)

// no-op-define,
#define _DALI_TEMPLATE_VIS
Expand Down