diff --git a/CHANGELOG.md b/CHANGELOG.md index 52210a69ef0..2b89158a345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Improvements +- PR #6275 Update to official libcu++ on Github - PR #6838 Fix `columns` & `index` handling in dataframe constructor ## Bug Fixes diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a00fb5af9ac..08fe517d6e1 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -397,10 +397,8 @@ endif(CONDA_LINK_DIRS) add_executable(stringify "${JITIFY_INCLUDE_DIR}/stringify.cpp") execute_process(WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory - ${CMAKE_BINARY_DIR}/include/jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/details - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include) + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include + ) add_custom_command(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include COMMENT "Stringify headers for use in JIT compiled code" @@ -411,52 +409,62 @@ add_custom_command(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include/jit/timestamps.hpp.jit ${CMAKE_BINARY_DIR}/include/jit/fixed_point.hpp.jit ${CMAKE_BINARY_DIR}/include/jit/durations.hpp.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/details/__config.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/limits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cfloat.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/chrono.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ctime.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ratio.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/type_traits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/version.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cmath.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cassert.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__config.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__undef_macros.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cfloat.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/chrono.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ctime.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/limits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ratio.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/type_traits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cmath.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cassert.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/chrono.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/climits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstddef.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstdint.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ctime.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/limits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ratio.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/type_traits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/version.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__config.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_pop.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_push.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__config.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_pop.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_push.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__undef_macros.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/chrono.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/climits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstddef.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstdint.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ctime.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/limits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ratio.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/type_traits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/version.jit MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/types.h ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/types.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/utilities/bit.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/wrappers/timestamps.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/fixed_point/fixed_point.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/cudf/wrappers/durations.hpp - ${LIBCUDACXX_INCLUDE_DIR}/details/__config - ${LIBCUDACXX_INCLUDE_DIR}/simt/limits - ${LIBCUDACXX_INCLUDE_DIR}/simt/cfloat - ${LIBCUDACXX_INCLUDE_DIR}/simt/chrono - ${LIBCUDACXX_INCLUDE_DIR}/simt/ctime - ${LIBCUDACXX_INCLUDE_DIR}/simt/ratio - ${LIBCUDACXX_INCLUDE_DIR}/simt/type_traits - ${LIBCUDACXX_INCLUDE_DIR}/simt/version - ${LIBCUDACXX_INCLUDE_DIR}/simt/cmath - ${LIBCUDACXX_INCLUDE_DIR}/simt/cassert - ${LIBCXX_INCLUDE_DIR}/__config - ${LIBCXX_INCLUDE_DIR}/__undef_macros - ${LIBCXX_INCLUDE_DIR}/cfloat - ${LIBCXX_INCLUDE_DIR}/chrono - ${LIBCXX_INCLUDE_DIR}/ctime - ${LIBCXX_INCLUDE_DIR}/limits - ${LIBCXX_INCLUDE_DIR}/ratio - ${LIBCXX_INCLUDE_DIR}/type_traits - ${LIBCXX_INCLUDE_DIR}/cmath - ${LIBCXX_INCLUDE_DIR}/cassert + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/chrono + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/climits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/cstddef + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/cstdint + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/ctime + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/limits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/ratio + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/type_traits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/version + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__config + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__pragma_pop + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__pragma_push + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__config + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__pragma_pop + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__pragma_push + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__undef_macros + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/chrono + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/climits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/cstddef + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/cstdint + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/ctime + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/limits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/ratio + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/type_traits + ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/version # stringified headers are placed underneath the bin include jit directory and end in ".jit" COMMAND ${CMAKE_BINARY_DIR}/stringify cudf/types.h > ${CMAKE_BINARY_DIR}/include/jit/types.h.jit @@ -466,26 +474,31 @@ add_custom_command(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include COMMAND ${CMAKE_BINARY_DIR}/stringify cudf/wrappers/timestamps.hpp > ${CMAKE_BINARY_DIR}/include/jit/timestamps.hpp.jit COMMAND ${CMAKE_BINARY_DIR}/stringify cudf/fixed_point/fixed_point.hpp > ${CMAKE_BINARY_DIR}/include/jit/fixed_point.hpp.jit COMMAND ${CMAKE_BINARY_DIR}/stringify cudf/wrappers/durations.hpp > ${CMAKE_BINARY_DIR}/include/jit/durations.hpp.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/details/__config libcudacxx_details_config > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/details/__config.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/limits libcudacxx_simt_limits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/limits.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/cfloat libcudacxx_simt_cfloat > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cfloat.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/chrono libcudacxx_simt_chrono > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/chrono.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/ctime libcudacxx_simt_ctime > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ctime.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/ratio libcudacxx_simt_ratio > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ratio.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/type_traits libcudacxx_simt_type_traits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/type_traits.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/cmath libcudacxx_simt_cmath > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cmath.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/simt/cassert libcudacxx_simt_cassert > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cassert.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/version libcudacxx_simt_version > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/version.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/__config libcxx_config > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__config.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/__undef_macros libcxx_undef_macros > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__undef_macros.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/cfloat libcxx_cfloat > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cfloat.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/chrono libcxx_chrono > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/chrono.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/ctime libcxx_ctime > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ctime.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/limits libcxx_limits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/limits.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/ratio libcxx_ratio > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ratio.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/type_traits libcxx_type_traits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/type_traits.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/cmath libcxx_cmath > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cmath.jit - COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCXX_INCLUDE_DIR}/cassert libcxx_cassert > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cassert.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/chrono cuda_std_chrono > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/chrono.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/climits cuda_std_climits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/climits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/cstddef cuda_std_cstddef > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstddef.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/cstdint cuda_std_cstdint > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstdint.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/ctime cuda_std_ctime > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ctime.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/limits cuda_std_limits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/limits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/ratio cuda_std_ratio > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ratio.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/type_traits cuda_std_type_traits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/type_traits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/version cuda_std_version > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/version.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__config cuda_std_detail___config > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__config.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__pragma_pop cuda_std_detail___pragma_pop > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_pop.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/__pragma_push cuda_std_detail___pragma_push > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_push.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__config cuda_std_detail_libcxx_include___config > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__config.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__pragma_pop cuda_std_detail_libcxx_include___pragma_pop > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_pop.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__pragma_push cuda_std_detail_libcxx_include___pragma_push > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_push.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/__undef_macros cuda_std_detail_libcxx_include___undef_macros > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__undef_macros.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/chrono cuda_std_detail_libcxx_include_chrono > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/chrono.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/climits cuda_std_detail_libcxx_include_climits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/climits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/cstddef cuda_std_detail_libcxx_include_cstddef > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstddef.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/cstdint cuda_std_detail_libcxx_include_cstdint > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstdint.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/ctime cuda_std_detail_libcxx_include_ctime > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ctime.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/limits cuda_std_detail_libcxx_include_limits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/limits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/ratio cuda_std_detail_libcxx_include_ratio > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ratio.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/type_traits cuda_std_detail_libcxx_include_type_traits > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/type_traits.jit + COMMAND ${CMAKE_BINARY_DIR}/stringify ${LIBCUDACXX_INCLUDE_DIR}/cuda/std/detail/libcxx/include/version cuda_std_detail_libcxx_include_version > ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/version.jit ) add_custom_target(stringify_run DEPENDS @@ -495,26 +508,31 @@ add_custom_target(stringify_run DEPENDS ${CMAKE_BINARY_DIR}/include/jit/timestamps.hpp.jit ${CMAKE_BINARY_DIR}/include/jit/fixed_point.hpp.jit ${CMAKE_BINARY_DIR}/include/jit/durations.hpp.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/details/__config.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/limits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cfloat.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/chrono.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ctime.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/ratio.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/type_traits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cmath.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/cassert.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/simt/version.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__config.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/__undef_macros.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cfloat.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/chrono.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ctime.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/limits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/ratio.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/type_traits.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cmath.jit - ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/libcxx/include/cassert.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/chrono.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/climits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstddef.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/cstdint.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ctime.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/limits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/ratio.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/type_traits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/version.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__config.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_pop.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/__pragma_push.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__config.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_pop.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__pragma_push.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/__undef_macros.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/chrono.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/climits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstddef.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/cstdint.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ctime.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/limits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/ratio.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/type_traits.jit + ${CMAKE_BINARY_DIR}/include/jit/libcudacxx/cuda/std/detail/libcxx/include/version.jit ) ################################################################################################### diff --git a/cpp/benchmarks/common/generate_benchmark_input.cpp b/cpp/benchmarks/common/generate_benchmark_input.cpp index 250d78c180a..a064270d5a5 100644 --- a/cpp/benchmarks/common/generate_benchmark_input.cpp +++ b/cpp/benchmarks/common/generate_benchmark_input.cpp @@ -121,11 +121,11 @@ struct random_value_fn()>> { random_value_fn(distribution_params params) { - using simt::std::chrono::duration_cast; + using cuda::std::chrono::duration_cast; std::pair const range_s = { - duration_cast(typename T::duration{params.lower_bound}), - duration_cast(typename T::duration{params.upper_bound})}; + duration_cast(typename T::duration{params.lower_bound}), + duration_cast(typename T::duration{params.upper_bound})}; if (range_s.first != range_s.second) { seconds_gen = make_distribution(params.id, range_s.first.count(), range_s.second.count()); @@ -149,7 +149,7 @@ struct random_value_fn()>> { auto const timestamp_ns = cudf::duration_s{seconds_gen(engine)} + cudf::duration_ns{nanoseconds_gen(engine)}; // Return value in the type's precision - return T(simt::std::chrono::duration_cast(timestamp_ns)); + return T(cuda::std::chrono::duration_cast(timestamp_ns)); } }; diff --git a/cpp/benchmarks/common/generate_benchmark_input.hpp b/cpp/benchmarks/common/generate_benchmark_input.hpp index d9eec20d3d2..acb8adc98e9 100644 --- a/cpp/benchmarks/common/generate_benchmark_input.hpp +++ b/cpp/benchmarks/common/generate_benchmark_input.hpp @@ -93,7 +93,7 @@ distribution_id default_distribution_id() template ()>* = nullptr> std::pair default_range() { - using simt::std::chrono::duration_cast; + using cuda::std::chrono::duration_cast; auto const year = duration_cast(cudf::duration_D{365l}); return {50 * year.count(), 0}; } @@ -106,7 +106,7 @@ std::pair default_range() template ()>* = nullptr> std::pair default_range() { - using simt::std::chrono::duration_cast; + using cuda::std::chrono::duration_cast; auto const year = duration_cast(cudf::duration_D{365l}); return {0, 2 * year.count()}; } diff --git a/cpp/include/cudf/ast/detail/operators.hpp b/cpp/include/cudf/ast/detail/operators.hpp index e2dda57bab8..536dbb94a52 100644 --- a/cpp/include/cudf/ast/detail/operators.hpp +++ b/cpp/include/cudf/ast/detail/operators.hpp @@ -15,12 +15,14 @@ */ #pragma once -#include #include #include #include #include -#include + +#include + +#include #include #include #include @@ -33,10 +35,10 @@ namespace detail { // Traits for valid operator / type combinations template -constexpr bool is_valid_binary_op = simt::std::is_invocable::value; +constexpr bool is_valid_binary_op = cuda::std::is_invocable::value; template -constexpr bool is_valid_unary_op = simt::std::is_invocable::value; +constexpr bool is_valid_unary_op = cuda::std::is_invocable::value; /** * @brief Operator dispatcher @@ -983,7 +985,7 @@ struct return_type_functor { std::enable_if_t>* = nullptr> CUDA_HOST_DEVICE_CALLABLE void operator()(cudf::data_type& result) { - using Out = simt::std::invoke_result_t; + using Out = cuda::std::invoke_result_t; result = cudf::data_type(cudf::type_to_id()); } @@ -1012,7 +1014,7 @@ struct return_type_functor { std::enable_if_t>* = nullptr> CUDA_HOST_DEVICE_CALLABLE void operator()(cudf::data_type& result) { - using Out = simt::std::invoke_result_t; + using Out = cuda::std::invoke_result_t; result = cudf::data_type(cudf::type_to_id()); } diff --git a/cpp/include/cudf/ast/detail/transform.cuh b/cpp/include/cudf/ast/detail/transform.cuh index 96c8abe6c66..61aedab2f04 100644 --- a/cpp/include/cudf/ast/detail/transform.cuh +++ b/cpp/include/cudf/ast/detail/transform.cuh @@ -76,7 +76,7 @@ struct unary_row_output : public row_output { detail::device_data_reference output) const { using OperatorFunctor = detail::operator_functor; - using Out = simt::std::invoke_result_t; + using Out = cuda::std::invoke_result_t; resolve_output(output, row_index, OperatorFunctor{}(input)); } @@ -104,7 +104,7 @@ struct binary_row_output : public row_output { detail::device_data_reference output) const { using OperatorFunctor = detail::operator_functor; - using Out = simt::std::invoke_result_t; + using Out = cuda::std::invoke_result_t; resolve_output(output, row_index, OperatorFunctor{}(lhs, rhs)); } diff --git a/cpp/include/cudf/detail/copy_if.cuh b/cpp/include/cudf/detail/copy_if.cuh index 0b960deb826..05a2a363b88 100644 --- a/cpp/include/cudf/detail/copy_if.cuh +++ b/cpp/include/cudf/detail/copy_if.cuh @@ -200,6 +200,26 @@ __launch_bounds__(block_size) __global__ } } +template +struct DeviceType { + using type = T; +}; + +template +struct DeviceType()>> { + using type = typename T::rep; +}; + +template +struct DeviceType::value>> { + using type = typename cudf::device_storage_type_t; +}; + +template +struct DeviceType::value>> { + using type = typename cudf::device_storage_type_t; +}; + // Dispatch functor which performs the scatter for fixed column types and gather for other template struct scatter_gather_functor { @@ -219,7 +239,8 @@ struct scatter_gather_functor { bool has_valid = input.nullable(); - using Type = cudf::device_storage_type_t; + using Type = typename DeviceType::type; + auto scatter = (has_valid) ? scatter_kernel : scatter_kernel; diff --git a/cpp/include/cudf/fixed_point/fixed_point.hpp b/cpp/include/cudf/fixed_point/fixed_point.hpp index abf7e3bcf90..c8f9a73a1d6 100644 --- a/cpp/include/cudf/fixed_point/fixed_point.hpp +++ b/cpp/include/cudf/fixed_point/fixed_point.hpp @@ -16,17 +16,16 @@ #pragma once -#define _LIBCUDACXX_USE_CXX17_TYPE_TRAITS +#include -// Note: The versions are used in order for Jitify to work with our fixed_point type. +// Note: The versions are used in order for Jitify to work with our fixed_point type. // Jitify is needed for several algorithms (binaryop, rolling, etc) -#include -#include // add simt namespace +#include +#include // add cuda namespace #include #include #include - #include //! `fixed_point` and supporting types @@ -60,13 +59,13 @@ enum class Radix : int32_t { BASE_2 = 2, BASE_10 = 10 }; template constexpr inline auto is_supported_representation_type() { - return simt::std::is_same::value || simt::std::is_same::value; + return cuda::std::is_same::value || cuda::std::is_same::value; } template constexpr inline auto is_supported_construction_value_type() { - return simt::std::is_integral::value || simt::std::is_floating_point::value; + return cuda::std::is_integral::value || cuda::std::is_floating_point::value; } // Helper functions for `fixed_point` type @@ -87,7 +86,7 @@ namespace detail { template ::value && + typename cuda::std::enable_if_t<(cuda::std::is_same::value && is_supported_representation_type())>* = nullptr> CUDA_HOST_DEVICE_CALLABLE Rep ipow(T exponent) { @@ -192,7 +191,7 @@ CUDA_HOST_DEVICE_CALLABLE constexpr T shift(T const& val, scale_type const& scal * @tparam Rep The representation type (either `int32_t` or `int64_t`) */ template ()>* = nullptr> + typename cuda::std::enable_if_t()>* = nullptr> struct scaled_integer { Rep value; scale_type scale; @@ -224,7 +223,7 @@ class fixed_point { * @param scale The exponent that is applied to Rad to perform shifting */ template () && + typename cuda::std::enable_if_t() && is_supported_representation_type()>* = nullptr> CUDA_HOST_DEVICE_CALLABLE explicit fixed_point(T const& value, scale_type const& scale) : _value{static_cast(detail::shift(value, scale))}, _scale{scale} @@ -245,7 +244,7 @@ class fixed_point { * value and scale of zero */ template ()>* = nullptr> + typename cuda::std::enable_if_t()>* = nullptr> CUDA_HOST_DEVICE_CALLABLE fixed_point(T const& value) : _value{static_cast(value)}, _scale{scale_type{0}} { @@ -265,7 +264,7 @@ class fixed_point { * @return The `fixed_point` number in base 10 (aka human readable format) */ template ()>* = nullptr> + typename cuda::std::enable_if_t()>* = nullptr> CUDA_HOST_DEVICE_CALLABLE explicit constexpr operator U() const { return detail::shift(static_cast(_value), detail::negate(_scale)); @@ -538,9 +537,9 @@ class fixed_point { template std::string print_rep() { - if (simt::std::is_same::value) + if (cuda::std::is_same::value) return "int32_t"; - else if (simt::std::is_same::value) + else if (cuda::std::is_same::value) return "int64_t"; else return "unknown type"; @@ -557,8 +556,8 @@ std::string print_rep() template CUDA_HOST_DEVICE_CALLABLE auto addition_overflow(T lhs, T rhs) { - return rhs > 0 ? lhs > simt::std::numeric_limits::max() - rhs - : lhs < simt::std::numeric_limits::min() - rhs; + return rhs > 0 ? lhs > cuda::std::numeric_limits::max() - rhs + : lhs < cuda::std::numeric_limits::min() - rhs; } /** @brief Function for identifying integer overflow when subtracting @@ -572,8 +571,8 @@ CUDA_HOST_DEVICE_CALLABLE auto addition_overflow(T lhs, T rhs) template CUDA_HOST_DEVICE_CALLABLE auto subtraction_overflow(T lhs, T rhs) { - return rhs > 0 ? lhs < simt::std::numeric_limits::min() + rhs - : lhs > simt::std::numeric_limits::max() + rhs; + return rhs > 0 ? lhs < cuda::std::numeric_limits::min() + rhs + : lhs > cuda::std::numeric_limits::max() + rhs; } /** @brief Function for identifying integer overflow when dividing @@ -587,7 +586,7 @@ CUDA_HOST_DEVICE_CALLABLE auto subtraction_overflow(T lhs, T rhs) template CUDA_HOST_DEVICE_CALLABLE auto division_overflow(T lhs, T rhs) { - return lhs == simt::std::numeric_limits::min() && rhs == -1; + return lhs == cuda::std::numeric_limits::min() && rhs == -1; } /** @brief Function for identifying integer overflow when multiplying @@ -601,8 +600,8 @@ CUDA_HOST_DEVICE_CALLABLE auto division_overflow(T lhs, T rhs) template CUDA_HOST_DEVICE_CALLABLE auto multiplication_overflow(T lhs, T rhs) { - auto const min = simt::std::numeric_limits::min(); - auto const max = simt::std::numeric_limits::max(); + auto const min = cuda::std::numeric_limits::min(); + auto const max = cuda::std::numeric_limits::max(); if (rhs > 0) return lhs > max / rhs || lhs < min / rhs; else if (rhs < -1) diff --git a/cpp/include/cudf/utilities/traits.hpp b/cpp/include/cudf/utilities/traits.hpp index 9c009ce5b60..90600d8dc3f 100644 --- a/cpp/include/cudf/utilities/traits.hpp +++ b/cpp/include/cudf/utilities/traits.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include namespace cudf { @@ -66,14 +66,14 @@ struct is_equality_comparable_impl>> : st }; template -using is_timestamp_t = simt::std::disjunction, +using is_timestamp_t = cuda::std::disjunction, std::is_same, std::is_same, std::is_same, std::is_same>; template -using is_duration_t = simt::std::disjunction, +using is_duration_t = cuda::std::disjunction, std::is_same, std::is_same, std::is_same, diff --git a/cpp/include/cudf/utilities/type_dispatcher.hpp b/cpp/include/cudf/utilities/type_dispatcher.hpp index 6a8e92c4052..2bd3f12feac 100644 --- a/cpp/include/cudf/utilities/type_dispatcher.hpp +++ b/cpp/include/cudf/utilities/type_dispatcher.hpp @@ -17,14 +17,14 @@ #pragma once #include +#include #include #include #include #include #include -#include -#include +#include /** * @file diff --git a/cpp/include/cudf/wrappers/durations.hpp b/cpp/include/cudf/wrappers/durations.hpp index 90050e78ad2..c526ab45a1d 100644 --- a/cpp/include/cudf/wrappers/durations.hpp +++ b/cpp/include/cudf/wrappers/durations.hpp @@ -18,10 +18,7 @@ #include -#define _LIBCUDACXX_USE_CXX20_CHRONO -#define _LIBCUDACXX_USE_CXX17_TYPE_TRAITS - -#include +#include namespace cudf { @@ -35,23 +32,23 @@ namespace cudf { /** * @brief Type alias representing an int32_t duration of days. **/ -using duration_D = simt::std::chrono::duration; +using duration_D = cuda::std::chrono::duration; /** * @brief Type alias representing an int64_t duration of seconds. **/ -using duration_s = simt::std::chrono::duration; +using duration_s = cuda::std::chrono::duration; /** * @brief Type alias representing an int64_t duration of milliseconds. **/ -using duration_ms = simt::std::chrono::duration; +using duration_ms = cuda::std::chrono::duration; /** * @brief Type alias representing an int64_t duration of microseconds. **/ -using duration_us = simt::std::chrono::duration; +using duration_us = cuda::std::chrono::duration; /** * @brief Type alias representing an int64_t duration of nanoseconds. **/ -using duration_ns = simt::std::chrono::duration; +using duration_ns = cuda::std::chrono::duration; static_assert(sizeof(duration_D) == sizeof(typename duration_D::rep), ""); static_assert(sizeof(duration_s) == sizeof(typename duration_s::rep), ""); diff --git a/cpp/include/cudf/wrappers/timestamps.hpp b/cpp/include/cudf/wrappers/timestamps.hpp index 78f971573cf..cf22c088f9c 100644 --- a/cpp/include/cudf/wrappers/timestamps.hpp +++ b/cpp/include/cudf/wrappers/timestamps.hpp @@ -18,10 +18,7 @@ #include -#define _LIBCUDACXX_USE_CXX20_CHRONO -#define _LIBCUDACXX_USE_CXX17_TYPE_TRAITS - -#include +#include /** * @file timestamps.hpp @@ -32,7 +29,7 @@ namespace cudf { namespace detail { // TODO: Use chrono::utc_clock when available in libcu++? template -using time_point = simt::std::chrono::sys_time; +using time_point = cuda::std::chrono::sys_time; template struct timestamp : time_point { @@ -61,27 +58,27 @@ struct timestamp : time_point { * epoch. **/ using timestamp_D = - detail::timestamp>>; + detail::timestamp>>; /** * @brief Type alias representing an int64_t duration of seconds since the * unix epoch. **/ -using timestamp_s = detail::timestamp>>; +using timestamp_s = detail::timestamp>>; /** * @brief Type alias representing an int64_t duration of milliseconds since * the unix epoch. **/ -using timestamp_ms = detail::timestamp>; +using timestamp_ms = detail::timestamp>; /** * @brief Type alias representing an int64_t duration of microseconds since * the unix epoch. **/ -using timestamp_us = detail::timestamp>; +using timestamp_us = detail::timestamp>; /** * @brief Type alias representing an int64_t duration of nanoseconds since * the unix epoch. **/ -using timestamp_ns = detail::timestamp>; +using timestamp_ns = detail::timestamp>; static_assert(sizeof(timestamp_D) == sizeof(typename timestamp_D::rep), ""); static_assert(sizeof(timestamp_s) == sizeof(typename timestamp_s::rep), ""); diff --git a/cpp/include/cudf_test/timestamp_utilities.cuh b/cpp/include/cudf_test/timestamp_utilities.cuh index 508b20b4d5b..c4c38277381 100644 --- a/cpp/include/cudf_test/timestamp_utilities.cuh +++ b/cpp/include/cudf_test/timestamp_utilities.cuh @@ -28,7 +28,7 @@ namespace cudf { namespace test { using time_point_ms = - simt::std::chrono::time_point; + cuda::std::chrono::time_point; /** * @brief Creates a `thrust::device_vector` with ascending timestamps in the @@ -38,11 +38,11 @@ using time_point_ms = * and `stop`. * * @tparam Rep The arithmetic type representing the number of ticks - * @tparam Period A simt::std::ratio representing the tick period (i.e. the + * @tparam Period A cuda::std::ratio representing the tick period (i.e. the *number of seconds per tick) * @param count The number of timestamps to create - * @param start The first timestamp as a simt::std::chrono::time_point - * @param stop The last timestamp as a simt::std::chrono::time_point + * @param start The first timestamp as a cuda::std::chrono::time_point + * @param stop The last timestamp as a cuda::std::chrono::time_point **/ template inline cudf::test::fixed_width_column_wrapper generate_timestamps(int32_t count, @@ -51,7 +51,7 @@ inline cudf::test::fixed_width_column_wrapper generate_timestamps(in { using Rep = typename T::rep; using Period = typename T::period; - using ToDuration = simt::std::chrono::duration; + using ToDuration = cuda::std::chrono::duration; auto lhs = start.time_since_epoch().count(); auto rhs = stop.time_since_epoch().count(); @@ -61,8 +61,8 @@ inline cudf::test::fixed_width_column_wrapper generate_timestamps(in auto max = std::max(lhs, rhs); auto range = max - min; auto iter = cudf::test::make_counting_transform_iterator(0, [=](auto i) { - return simt::std::chrono::floor( - simt::std::chrono::milliseconds(min + (range / count) * i)) + return cuda::std::chrono::floor( + cuda::std::chrono::milliseconds(min + (range / count) * i)) .count(); }); diff --git a/cpp/src/binaryop/binaryop.cpp b/cpp/src/binaryop/binaryop.cpp index fde4caa068d..18e277ca228 100644 --- a/cpp/src/binaryop/binaryop.cpp +++ b/cpp/src/binaryop/binaryop.cpp @@ -17,13 +17,14 @@ * limitations under the License. */ -#include -#include -#include +#include "compiled/binary_ops.hpp" +#include "jit/code/code.h" +#include "jit/util.hpp" #include #include #include + #include #include #include @@ -33,7 +34,6 @@ #include #include -#include // replace eventually #include #include #include diff --git a/cpp/src/binaryop/jit/code/kernel.cpp b/cpp/src/binaryop/jit/code/kernel.cpp index ba7ab305de4..cfa1f1f82d2 100644 --- a/cpp/src/binaryop/jit/code/kernel.cpp +++ b/cpp/src/binaryop/jit/code/kernel.cpp @@ -26,13 +26,13 @@ namespace code { // clang-format off const char* kernel = R"***( + #include "operation.h" + #include - #include #include #include #include #include - #include "operation.h" template __global__ diff --git a/cpp/src/binaryop/jit/code/operation.cpp b/cpp/src/binaryop/jit/code/operation.cpp index 5d930afc1c6..938ab0614d4 100644 --- a/cpp/src/binaryop/jit/code/operation.cpp +++ b/cpp/src/binaryop/jit/code/operation.cpp @@ -25,10 +25,14 @@ namespace code { const char* operation = R"***( #pragma once - #include - #include + #include "traits.h" - using namespace simt::std; + + #include + + #include + + using namespace cuda::std; struct Add { // Allow sum between chronos only when both input and output types @@ -514,9 +518,9 @@ const char* operation = template ::type>)>* = nullptr> + enable_if_t<(is_integral_v::type>)>* = nullptr> static TypeOut operate(TypeLhs x, TypeRhs y) { - using common_t = typename simt::std::common_type::type; + using common_t = typename cuda::std::common_type::type; common_t xconv{x}; common_t yconv{y}; auto rem = xconv % yconv; @@ -527,9 +531,9 @@ const char* operation = template ::type>)>* = nullptr> + enable_if_t::type>)>* = nullptr> static TypeOut operate(TypeLhs x, TypeRhs y) { - using common_t = typename simt::std::common_type::type; + using common_t = typename cuda::std::common_type::type; common_t xconv{x}; common_t yconv{y}; auto rem = std::fmod(xconv, yconv); diff --git a/cpp/src/binaryop/jit/code/traits.cpp b/cpp/src/binaryop/jit/code/traits.cpp index da826c43ec3..53b980b1a02 100644 --- a/cpp/src/binaryop/jit/code/traits.cpp +++ b/cpp/src/binaryop/jit/code/traits.cpp @@ -23,18 +23,18 @@ namespace jit { namespace code { const char* traits = R"***( -#pragma once - #include - #include + #pragma once - // ------------------------------------------------------------------------- - // Simplifying std::is_integral - template - constexpr bool is_integral_v = simt::std::is_integral::value; + // Include Jitify's cstddef header first + #include - // Simplifying std::is_floating_point - template - constexpr bool is_floating_point_v = simt::std::is_floating_point::value; + #include + #include + #include + #include + + #include + #include // ------------------------------------------------------------------------- // type_traits cannot tell the difference between float and double @@ -43,19 +43,19 @@ const char* traits = template constexpr bool is_timestamp_v = - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value; + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value; template constexpr bool is_duration_v = - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value || - simt::std::is_same::value; + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value || + cuda::std::is_same::value; template constexpr bool is_chrono_v = is_timestamp_v || is_duration_v; diff --git a/cpp/src/datetime/datetime_ops.cu b/cpp/src/datetime/datetime_ops.cu index e4989c743ef..6e996dfefb3 100644 --- a/cpp/src/datetime/datetime_ops.cu +++ b/cpp/src/datetime/datetime_ops.cu @@ -48,7 +48,7 @@ struct extract_component_operator { template CUDA_DEVICE_CALLABLE int16_t operator()(Timestamp const ts) const { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto days_since_epoch = floor(ts); @@ -83,7 +83,7 @@ static __device__ int16_t const days_until_month[2][13] = { {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} // For leap years }; -CUDA_DEVICE_CALLABLE uint8_t days_in_month(simt::std::chrono::month mon, bool is_leap_year) +CUDA_DEVICE_CALLABLE uint8_t days_in_month(cuda::std::chrono::month mon, bool is_leap_year) { return days_until_month[is_leap_year][unsigned{mon}] - days_until_month[is_leap_year][unsigned{mon} - 1]; @@ -95,7 +95,7 @@ struct extract_last_day_of_month { template CUDA_DEVICE_CALLABLE timestamp_D operator()(Timestamp const ts) const { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // IDEAL: does not work with CUDA10.0 due to nvcc compiler bug // cannot invoke ym_last_day.day() // const year_month_day orig_ymd(floor(ts)); @@ -116,7 +116,7 @@ struct extract_day_num_of_year { template CUDA_DEVICE_CALLABLE int16_t operator()(Timestamp const ts) const { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Only has the days - time component is chopped off, which is what we want auto const days_since_epoch = floor(ts); @@ -195,9 +195,9 @@ struct add_calendrical_months_functor { // std chrono implementation is copied here due to nvcc bug 2909685 // https://howardhinnant.github.io/date_algorithms.html#days_from_civil static CUDA_DEVICE_CALLABLE timestamp_D - compute_sys_days(simt::std::chrono::year_month_day const& ymd) + compute_sys_days(cuda::std::chrono::year_month_day const& ymd) { - const int yr = static_cast(ymd.year()) - (ymd.month() <= simt::std::chrono::month{2}); + const int yr = static_cast(ymd.year()) - (ymd.month() <= cuda::std::chrono::month{2}); const unsigned mth = static_cast(ymd.month()); const unsigned dy = static_cast(ymd.day()); @@ -225,7 +225,7 @@ struct add_calendrical_months_functor { months_column.begin(), output.begin(), [] __device__(auto time_val, auto months_val) { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; using duration_m = duration; // Get the days component from the input diff --git a/cpp/src/io/csv/datetime.cuh b/cpp/src/io/csv/datetime.cuh index 56460ae5182..160a5141bc5 100644 --- a/cpp/src/io/csv/datetime.cuh +++ b/cpp/src/io/csv/datetime.cuh @@ -447,8 +447,8 @@ __inline__ __device__ int64_t parseTimeDeltaFormat(const char* data, long start, } } - return simt::std::chrono::duration_cast( + return cuda::std::chrono::duration_cast( cudf::duration_s{((days * 24L + hour) * 60L + minute) * 60L + second}) .count() + - simt::std::chrono::duration_cast(cudf::duration_ns{nanosecond}).count(); + cuda::std::chrono::duration_cast(cudf::duration_ns{nanosecond}).count(); } diff --git a/cpp/src/io/csv/durations.cu b/cpp/src/io/csv/durations.cu index 3cfb4d88ec6..83118023e6e 100644 --- a/cpp/src/io/csv/durations.cu +++ b/cpp/src/io/csv/durations.cu @@ -47,25 +47,25 @@ template __device__ void dissect_duration(T duration, duration_component* timeparts) { timeparts->is_negative = (duration < T{0}); - timeparts->day = simt::std::chrono::floor(duration).count(); + timeparts->day = cuda::std::chrono::floor(duration).count(); - if (simt::std::is_same::value) return; + if (cuda::std::is_same::value) return; // adjust for pandas format if (timeparts->is_negative) { duration = - simt::std::chrono::duration_cast(duration % duration_D(1) + simt::std::chrono::hours(24)); + cuda::std::chrono::duration_cast(duration % duration_D(1) + cuda::std::chrono::hours(24)); } - duration_s seconds = simt::std::chrono::duration_cast(duration); + duration_s seconds = cuda::std::chrono::duration_cast(duration); timeparts->hour = - (simt::std::chrono::duration_cast(seconds) % duration_D(1)).count(); - timeparts->minute = (simt::std::chrono::duration_cast(seconds) % - simt::std::chrono::hours(1)) + (cuda::std::chrono::duration_cast(seconds) % duration_D(1)).count(); + timeparts->minute = (cuda::std::chrono::duration_cast(seconds) % + cuda::std::chrono::hours(1)) .count(); - timeparts->second = (seconds % simt::std::chrono::minutes(1)).count(); - if (not simt::std::is_same::value) { + timeparts->second = (seconds % cuda::std::chrono::minutes(1)).count(); + if (not cuda::std::is_same::value) { timeparts->nanosecond = - (simt::std::chrono::duration_cast(duration) % duration_s(1)).count(); + (cuda::std::chrono::duration_cast(duration) % duration_s(1)).count(); } } diff --git a/cpp/src/io/parquet/page_enc.cu b/cpp/src/io/parquet/page_enc.cu index 0752c957eaf..55679338ed2 100644 --- a/cpp/src/io/parquet/page_enc.cu +++ b/cpp/src/io/parquet/page_enc.cu @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #include #include -#include #include #include @@ -26,6 +24,8 @@ #include #include +#include +#include namespace cudf { namespace io { @@ -916,8 +916,8 @@ static __device__ void PlainBoolEncode(page_enc_state_s *s, constexpr auto julian_calendar_epoch_diff() { - using namespace simt::std::chrono; - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono; + using namespace cuda::std::chrono_literals; return sys_days{January / 1 / 1970} - (sys_days{November / 24 / -4713} + 12h); } @@ -929,10 +929,10 @@ constexpr auto julian_calendar_epoch_diff() * @return std::pair where nanoseconds is the number of nanoseconds * elapsed in the day and days is the number of days from Julian epoch. */ -static __device__ std::pair -convert_nanoseconds(simt::std::chrono::sys_time const ns) +static __device__ std::pair +convert_nanoseconds(cuda::std::chrono::sys_time const ns) { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto const nanosecond_ticks = ns.time_since_epoch(); auto const gregorian_days = floor(nanosecond_ticks); auto const julian_days = gregorian_days + ceil(julian_calendar_epoch_diff()); @@ -1189,7 +1189,7 @@ __global__ void __launch_bounds__(128, 8) gpuEncodePages(EncPage *pages, } auto const ret = convert_nanoseconds([&]() { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; switch (s->col.converted_type) { case TIMESTAMP_MILLIS: { diff --git a/cpp/src/jit/common_headers.hpp b/cpp/src/jit/common_headers.hpp index 17f99294431..0f57790afe0 100644 --- a/cpp/src/jit/common_headers.hpp +++ b/cpp/src/jit/common_headers.hpp @@ -17,28 +17,37 @@ * limitations under the License. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include namespace cudf { namespace jit { @@ -52,12 +61,6 @@ const std::vector compiler_flags "-w", // force libcudacxx to not include system headers "-D__CUDACC_RTC__", - // __CHAR_BIT__ is from GCC, but libcxx uses it - "-D__CHAR_BIT__=" + std::to_string(__CHAR_BIT__), - // enable temporary workarounds to compile libcudacxx with nvrtc - "-D_LIBCUDACXX_HAS_NO_CTIME", "-D_LIBCUDACXX_HAS_NO_WCHAR", "-D_LIBCUDACXX_HAS_NO_CFLOAT", - "-D_LIBCUDACXX_HAS_NO_STDINT", "-D_LIBCUDACXX_HAS_NO_CSTDDEF", "-D_LIBCUDACXX_HAS_NO_CLIMITS", - "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", #if defined(__powerpc64__) "-D__powerpc64__" #elif defined(__x86_64__) @@ -66,24 +69,32 @@ const std::vector compiler_flags }; const std::unordered_map stringified_headers{ - {"details/../../libcxx/include/__config", libcxx_config}, - {"../libcxx/include/__undef_macros", libcxx_undef_macros}, - {"simt/../../libcxx/include/cfloat", libcxx_cfloat}, - {"simt/../../libcxx/include/chrono", libcxx_chrono}, - {"simt/../../libcxx/include/ctime", libcxx_ctime}, - {"simt/../../libcxx/include/limits", libcxx_limits}, - {"simt/../../libcxx/include/ratio", libcxx_ratio}, - {"simt/../../libcxx/include/cmath", libcxx_cmath}, - {"simt/../../libcxx/include/cassert", libcxx_cassert}, - {"simt/../../libcxx/include/type_traits", libcxx_type_traits}, - {"simt/../details/__config", libcudacxx_details_config}, - {"simt/cfloat", libcudacxx_simt_cfloat}, - {"simt/chrono", libcudacxx_simt_chrono}, - {"simt/ctime", libcudacxx_simt_ctime}, - {"simt/limits", libcudacxx_simt_limits}, - {"simt/ratio", libcudacxx_simt_ratio}, - {"simt/type_traits", libcudacxx_simt_type_traits}, - {"simt/version", libcudacxx_simt_version}, + {"cuda/std/chrono", cuda_std_chrono}, + {"cuda/std/climits", cuda_std_climits}, + {"cuda/std/cstddef", cuda_std_cstddef}, + {"cuda/std/cstdint", cuda_std_cstdint}, + {"cuda/std/ctime", cuda_std_ctime}, + {"cuda/std/limits", cuda_std_limits}, + {"cuda/std/ratio", cuda_std_ratio}, + {"cuda/std/type_traits", cuda_std_type_traits}, + {"cuda/std/type_traits", cuda_std_type_traits}, + {"cuda/std/version", cuda_std_version}, + {"cuda/std/detail/__config", cuda_std_detail___config}, + {"cuda/std/detail/__pragma_pop", cuda_std_detail___pragma_pop}, + {"cuda/std/detail/__pragma_push", cuda_std_detail___pragma_push}, + {"cuda/std/detail/libcxx/include/__config", cuda_std_detail_libcxx_include___config}, + {"cuda/std/detail/libcxx/include/__pragma_pop", cuda_std_detail_libcxx_include___pragma_pop}, + {"cuda/std/detail/libcxx/include/__pragma_push", cuda_std_detail_libcxx_include___pragma_push}, + {"cuda/std/detail/libcxx/include/__undef_macros", cuda_std_detail_libcxx_include___undef_macros}, + {"cuda/std/detail/libcxx/include/chrono", cuda_std_detail_libcxx_include_chrono}, + {"cuda/std/detail/libcxx/include/climits", cuda_std_detail_libcxx_include_climits}, + {"cuda/std/detail/libcxx/include/cstddef", cuda_std_detail_libcxx_include_cstddef}, + {"cuda/std/detail/libcxx/include/cstdint", cuda_std_detail_libcxx_include_cstdint}, + {"cuda/std/detail/libcxx/include/ctime", cuda_std_detail_libcxx_include_ctime}, + {"cuda/std/detail/libcxx/include/limits", cuda_std_detail_libcxx_include_limits}, + {"cuda/std/detail/libcxx/include/ratio", cuda_std_detail_libcxx_include_ratio}, + {"cuda/std/detail/libcxx/include/type_traits", cuda_std_detail_libcxx_include_type_traits}, + {"cuda/std/detail/libcxx/include/version", cuda_std_detail_libcxx_include_version}, }; inline std::istream* send_stringified_header(std::iostream& stream, char const* header) diff --git a/cpp/src/jit/type.h b/cpp/src/jit/type.h index 12ae0beabf3..8d6402065e0 100644 --- a/cpp/src/jit/type.h +++ b/cpp/src/jit/type.h @@ -16,6 +16,10 @@ #pragma once +#include + +#include + namespace cudf { namespace jit { /** diff --git a/cpp/src/rolling/rolling.cu b/cpp/src/rolling/rolling.cu index 19d3b70f6c1..714a644925f 100644 --- a/cpp/src/rolling/rolling.cu +++ b/cpp/src/rolling/rolling.cu @@ -14,9 +14,13 @@ * limitations under the License. */ -#include -#include -#include +#include +#include +#include + +#include "jit/code/code.h" +#include "rolling_detail.hpp" +#include "rolling_jit_detail.hpp" #include #include @@ -37,9 +41,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/cpp/src/strings/convert/convert_datetime.cu b/cpp/src/strings/convert/convert_datetime.cu index 688ebacb95c..3dfdf9b8e44 100644 --- a/cpp/src/strings/convert/convert_datetime.cu +++ b/cpp/src/strings/convert/convert_datetime.cu @@ -623,7 +623,7 @@ struct datetime_formatter { __device__ cudf::timestamp_D::duration convert_to_days(int64_t timestamp, timestamp_units units) { - using namespace simt::std::chrono; + using namespace cuda::std::chrono; using minutes = duration; using hours = duration; switch (units) { @@ -638,7 +638,7 @@ struct datetime_formatter { } // divide timestamp integer into time components (year, month, day, etc) - // TODO call the simt::std::chrono methods here instead when they are ready + // TODO call the cuda::std::chrono methods here instead when they are ready __device__ void dissect_timestamp(int64_t timestamp, int32_t* timeparts) { if (units == timestamp_units::years) { @@ -679,7 +679,7 @@ struct datetime_formatter { // first, convert to days so we can handle months, years, day of the year. auto const days = convert_to_days(timestamp, units); - auto const ymd = simt::std::chrono::year_month_day(simt::std::chrono::sys_days(days)); + auto const ymd = cuda::std::chrono::year_month_day(cuda::std::chrono::sys_days(days)); auto const year = static_cast(ymd.year()); auto const month = static_cast(ymd.month()); auto const day = static_cast(ymd.day()); diff --git a/cpp/src/strings/convert/convert_durations.cu b/cpp/src/strings/convert/convert_durations.cu index cdcef791f7b..d29144798ed 100644 --- a/cpp/src/strings/convert/convert_durations.cu +++ b/cpp/src/strings/convert/convert_durations.cu @@ -163,18 +163,18 @@ template __device__ void dissect_duration(T duration, duration_component* timeparts) { timeparts->is_negative = (duration < T{0}); - timeparts->day = simt::std::chrono::duration_cast(duration).count(); + timeparts->day = cuda::std::chrono::duration_cast(duration).count(); - if (simt::std::is_same::value) return; + if (cuda::std::is_same::value) return; - duration_s seconds = simt::std::chrono::duration_cast(duration); + duration_s seconds = cuda::std::chrono::duration_cast(duration); timeparts->hour = - (simt::std::chrono::duration_cast(seconds) % duration_D(1)).count(); - timeparts->minute = (simt::std::chrono::duration_cast(seconds) % - simt::std::chrono::hours(1)) + (cuda::std::chrono::duration_cast(seconds) % duration_D(1)).count(); + timeparts->minute = (cuda::std::chrono::duration_cast(seconds) % + cuda::std::chrono::hours(1)) .count(); - timeparts->second = (seconds % simt::std::chrono::minutes(1)).count(); - if (not simt::std::is_same::value) { + timeparts->second = (seconds % cuda::std::chrono::minutes(1)).count(); + if (not cuda::std::is_same::value) { timeparts->subsecond = (duration % duration_s(1)).count(); } } @@ -192,9 +192,9 @@ struct duration_to_string_size_fn { case 'D': return count_digits(timeparts->day) - (timeparts->day < 0); break; case 'S': return 2 + (timeparts->subsecond == 0 ? 0 : [] { - if (simt::std::is_same::value) return 3 + 1; // +1 is for dot - if (simt::std::is_same::value) return 6 + 1; // +1 is for dot - if (simt::std::is_same::value) return 9 + 1; // +1 is for dot + if (cuda::std::is_same::value) return 3 + 1; // +1 is for dot + if (cuda::std::is_same::value) return 6 + 1; // +1 is for dot + if (cuda::std::is_same::value) return 9 + 1; // +1 is for dot return 0; }()); break; @@ -637,21 +637,21 @@ struct parse_duration { auto hour = timeparts->hour; auto minute = timeparts->minute; auto second = timeparts->second; - auto duration = duration_D(days) + simt::std::chrono::hours(hour) + - simt::std::chrono::minutes(minute) + duration_s(second); - if (simt::std::is_same::value) - return simt::std::chrono::duration_cast(duration).count(); - else if (simt::std::is_same::value) - return simt::std::chrono::duration_cast(duration).count(); + auto duration = duration_D(days) + cuda::std::chrono::hours(hour) + + cuda::std::chrono::minutes(minute) + duration_s(second); + if (cuda::std::is_same::value) + return cuda::std::chrono::duration_cast(duration).count(); + else if (cuda::std::is_same::value) + return cuda::std::chrono::duration_cast(duration).count(); duration_ns subsecond(timeparts->subsecond); // ns - if (simt::std::is_same::value) { - return simt::std::chrono::duration_cast(duration + subsecond).count(); - } else if (simt::std::is_same::value) { - return simt::std::chrono::duration_cast(duration + subsecond).count(); - } else if (simt::std::is_same::value) - return simt::std::chrono::duration_cast(duration + subsecond).count(); - return simt::std::chrono::duration_cast(duration + subsecond).count(); + if (cuda::std::is_same::value) { + return cuda::std::chrono::duration_cast(duration + subsecond).count(); + } else if (cuda::std::is_same::value) { + return cuda::std::chrono::duration_cast(duration + subsecond).count(); + } else if (cuda::std::is_same::value) + return cuda::std::chrono::duration_cast(duration + subsecond).count(); + return cuda::std::chrono::duration_cast(duration + subsecond).count(); } __device__ T operator()(size_type idx) diff --git a/cpp/src/transform/jit/code/kernel.cpp b/cpp/src/transform/jit/code/kernel.cpp index 38d4e951373..58fdb945de3 100644 --- a/cpp/src/transform/jit/code/kernel.cpp +++ b/cpp/src/transform/jit/code/kernel.cpp @@ -20,9 +20,16 @@ namespace jit { namespace code { const char* kernel_header = R"***( - #include - #include + #pragma once + + // Include Jitify's cstddef header first + #include + #include + #include + #include + + #include #include )***"; diff --git a/cpp/src/transform/transform.cpp b/cpp/src/transform/transform.cpp index f4224f87957..6da0f78687b 100644 --- a/cpp/src/transform/transform.cpp +++ b/cpp/src/transform/transform.cpp @@ -14,6 +14,13 @@ * limitations under the License. */ +#include "jit/code/code.h" + +#include +#include +#include +#include + #include #include #include @@ -22,12 +29,6 @@ #include #include -#include -#include -#include -#include "jit/code/code.h" - -#include #include #include diff --git a/cpp/src/unary/cast_ops.cu b/cpp/src/unary/cast_ops.cu index f30ec1e2b83..3dd9cf58f7c 100644 --- a/cpp/src/unary/cast_ops.cu +++ b/cpp/src/unary/cast_ops.cu @@ -51,7 +51,7 @@ struct unary_cast { // Convert source tick counts into target tick counts without blindly truncating them // by dividing the respective duration time periods (which may not work for time before // UNIX epoch) - return TargetT{simt::std::chrono::floor(element.time_since_epoch())}; + return TargetT{cuda::std::chrono::floor(element.time_since_epoch())}; } template ())>* = nullptr> CUDA_DEVICE_CALLABLE TargetT operator()(SourceT const element) { - return TargetT{simt::std::chrono::floor(element)}; + return TargetT{cuda::std::chrono::floor(element)}; } template ())>* = nullptr> CUDA_DEVICE_CALLABLE TargetT operator()(SourceT const element) { - return TargetT{simt::std::chrono::floor(element.time_since_epoch())}; + return TargetT{cuda::std::chrono::floor(element.time_since_epoch())}; } template ())>* = nullptr> CUDA_DEVICE_CALLABLE TargetT operator()(SourceT const element) { - return TargetT{simt::std::chrono::floor(element)}; + return TargetT{cuda::std::chrono::floor(element)}; } }; diff --git a/cpp/tests/binaryop/binop-generic-ptx-test.cpp b/cpp/tests/binaryop/binop-generic-ptx-test.cpp index 7ef10f1df67..6e35bdac41c 100644 --- a/cpp/tests/binaryop/binop-generic-ptx-test.cpp +++ b/cpp/tests/binaryop/binop-generic-ptx-test.cpp @@ -17,8 +17,9 @@ * limitations under the License. */ -#include #include + +#include #include namespace cudf { diff --git a/cpp/tests/binaryop/binop-integration-test.cpp b/cpp/tests/binaryop/binop-integration-test.cpp index fb73a374073..4cfbf0600a4 100644 --- a/cpp/tests/binaryop/binop-integration-test.cpp +++ b/cpp/tests/binaryop/binop-integration-test.cpp @@ -17,18 +17,19 @@ * limitations under the License. */ -#include -#include - #include #include #include #include #include + #include #include #include +#include +#include + namespace cudf { namespace test { namespace binop { diff --git a/cpp/tests/binaryop/binop-null-test.cpp b/cpp/tests/binaryop/binop-null-test.cpp index 7f2af67fb2b..3277e991b94 100644 --- a/cpp/tests/binaryop/binop-null-test.cpp +++ b/cpp/tests/binaryop/binop-null-test.cpp @@ -17,8 +17,9 @@ * limitations under the License. */ -#include #include + +#include #include namespace cudf { diff --git a/cpp/tests/binaryop/binop-verify-input-test.cpp b/cpp/tests/binaryop/binop-verify-input-test.cpp index 0827b8f3148..167fbc22bde 100644 --- a/cpp/tests/binaryop/binop-verify-input-test.cpp +++ b/cpp/tests/binaryop/binop-verify-input-test.cpp @@ -18,6 +18,7 @@ */ #include + #include namespace cudf { diff --git a/cpp/tests/datetime/datetime_ops_test.cpp b/cpp/tests/datetime/datetime_ops_test.cpp index c63cab91be7..e407af667db 100644 --- a/cpp/tests/datetime/datetime_ops_test.cpp +++ b/cpp/tests/datetime/datetime_ops_test.cpp @@ -41,7 +41,7 @@ TYPED_TEST(NonTimestampTest, TestThrowsOnNonTimestamp) using T = TypeParam; using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; cudf::data_type dtype{cudf::type_to_id()}; cudf::column col{dtype, 0, rmm::device_buffer{0}}; @@ -68,7 +68,7 @@ TEST_F(BasicDatetimeOpsTest, TestExtractingDatetimeComponents) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto timestamps_D = cudf::test::fixed_width_column_wrapper{ @@ -154,7 +154,7 @@ TYPED_TEST(TypedDatetimeOpsTest, TestEmptyColumns) using T = TypeParam; using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto int16s_dtype = cudf::data_type{cudf::type_to_id()}; auto timestamps_dtype = cudf::data_type{cudf::type_to_id()}; @@ -176,7 +176,7 @@ TYPED_TEST(TypedDatetimeOpsTest, TestExtractingGeneratedDatetimeComponents) using T = TypeParam; using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT @@ -213,7 +213,7 @@ TYPED_TEST(TypedDatetimeOpsTest, TestExtractingGeneratedNullableDatetimeComponen using T = TypeParam; using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT @@ -268,7 +268,7 @@ TEST_F(BasicDatetimeOpsTest, TestLastDayOfMonthWithSeconds) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in seconds since epoch // Dates converted using epochconverter.com @@ -308,7 +308,7 @@ TEST_F(BasicDatetimeOpsTest, TestLastDayOfMonthWithDate) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in days since epoch // Dates converted using epochconverter.com @@ -348,7 +348,7 @@ TEST_F(BasicDatetimeOpsTest, TestDayOfYearWithDate) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Day number in the year // Dates converted using epochconverter.com @@ -390,7 +390,7 @@ TEST_F(BasicDatetimeOpsTest, TestDayOfYearWithEmptyColumn) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Create an empty column auto timestamps_d = fixed_width_column_wrapper{}; @@ -402,7 +402,7 @@ TEST_F(BasicDatetimeOpsTest, TestAddMonthsWithInvalidColType) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in seconds since epoch // Dates converted using epochconverter.com @@ -421,7 +421,7 @@ TEST_F(BasicDatetimeOpsTest, TestAddMonthsWithIncorrectColSizes) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in seconds since epoch // Dates converted using epochconverter.com @@ -440,7 +440,7 @@ TEST_F(BasicDatetimeOpsTest, TestAddMonthsWithSeconds) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in seconds since epoch // Dates converted using epochconverter.com @@ -486,7 +486,7 @@ TEST_F(BasicDatetimeOpsTest, TestAddMonthsWithSecondsAndNullValues) { using namespace cudf::test; using namespace cudf::datetime; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; // Time in seconds since epoch // Dates converted using epochconverter.com diff --git a/cpp/tests/io/csv_test.cpp b/cpp/tests/io/csv_test.cpp index c8173ff66d0..2eaf66418eb 100644 --- a/cpp/tests/io/csv_test.cpp +++ b/cpp/tests/io/csv_test.cpp @@ -133,7 +133,7 @@ void check_timestamp_column(cudf::column_view const& col_lhs, long tol_ms = 1000l) { using T = cudf::timestamp_ms; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto h_lhs = cudf::test::to_host(col_lhs).first; auto h_rhs = cudf::test::to_host(col_rhs).first; @@ -150,7 +150,7 @@ void check_timestamp_column(cudf::column_view const& col_lhs, auto found = thrust::find_if( thrust::host, begin_count, end_count, [ptr_lhs, ptr_rhs, tol_ms](auto row_index) { - auto delta_ms = simt::std::chrono::duration_cast( + auto delta_ms = cuda::std::chrono::duration_cast( ptr_lhs[row_index] - ptr_rhs[row_index]); return delta_ms.count() >= tol_ms; }); @@ -425,7 +425,7 @@ TEST_F(CsvReaderTest, Dates) EXPECT_EQ(1, view.num_columns()); ASSERT_EQ(cudf::type_id::TIMESTAMP_MILLISECONDS, view.column(0).type().id()); - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono_literals; expect_column_data_equal(std::vector{cudf::timestamp_ms{983750400000ms}, cudf::timestamp_ms{1288483200000ms}, cudf::timestamp_ms{782611200000ms}, @@ -462,7 +462,7 @@ TEST_F(CsvReaderTest, DatesCastToTimestampSeconds) EXPECT_EQ(1, view.num_columns()); ASSERT_EQ(cudf::type_id::TIMESTAMP_SECONDS, view.column(0).type().id()); - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono_literals; expect_column_data_equal(std::vector{cudf::timestamp_s{983750400s}, cudf::timestamp_s{1288483200s}, cudf::timestamp_s{782611200s}, @@ -499,7 +499,7 @@ TEST_F(CsvReaderTest, DatesCastToTimestampMilliSeconds) EXPECT_EQ(1, view.num_columns()); ASSERT_EQ(cudf::type_id::TIMESTAMP_MILLISECONDS, view.column(0).type().id()); - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono_literals; expect_column_data_equal(std::vector{cudf::timestamp_ms{983750400000ms}, cudf::timestamp_ms{1288483200000ms}, cudf::timestamp_ms{782611200000ms}, @@ -536,7 +536,7 @@ TEST_F(CsvReaderTest, DatesCastToTimestampMicroSeconds) EXPECT_EQ(1, view.num_columns()); ASSERT_EQ(cudf::type_id::TIMESTAMP_MICROSECONDS, view.column(0).type().id()); - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono_literals; expect_column_data_equal(std::vector{cudf::timestamp_us{983750400000000us}, cudf::timestamp_us{1288483200000000us}, cudf::timestamp_us{782611200000000us}, @@ -573,7 +573,7 @@ TEST_F(CsvReaderTest, DatesCastToTimestampNanoSeconds) EXPECT_EQ(1, view.num_columns()); ASSERT_EQ(cudf::type_id::TIMESTAMP_NANOSECONDS, view.column(0).type().id()); - using namespace simt::std::chrono_literals; + using namespace cuda::std::chrono_literals; expect_column_data_equal( std::vector{cudf::timestamp_ns{983750400000000000ns}, cudf::timestamp_ns{1288483200000000000ns}, diff --git a/cpp/tests/transform/integration/unary-transform-test.cpp b/cpp/tests/transform/integration/unary-transform-test.cpp index f7eaf90dba6..bcbabde3176 100644 --- a/cpp/tests/transform/integration/unary-transform-test.cpp +++ b/cpp/tests/transform/integration/unary-transform-test.cpp @@ -205,7 +205,7 @@ TEST_F(UnaryOperationIntegrationTest, Transform_Datetime) R"***( __device__ inline void f(cudf::timestamp_us* output, cudf::timestamp_us input) { - using dur = simt::std::chrono::duration>; + using dur = cuda::std::chrono::duration>; *output = static_cast(input + dur{1}); } @@ -213,7 +213,7 @@ __device__ inline void f(cudf::timestamp_us* output, cudf::timestamp_us input) using dtype = timestamp_us; auto op = [](dtype a) { - using dur = simt::std::chrono::duration>; + using dur = cuda::std::chrono::duration>; return static_cast(a + dur{1}); }; auto random_eng = UniformRandomGenerator(0, 100000000); diff --git a/cpp/tests/wrappers/timestamps_test.cu b/cpp/tests/wrappers/timestamps_test.cu index b9cbcd7c8a5..5088c3122bd 100644 --- a/cpp/tests/wrappers/timestamps_test.cu +++ b/cpp/tests/wrappers/timestamps_test.cu @@ -74,7 +74,7 @@ TYPED_TEST(ChronoColumnTest, ChronoDurationsMatchPrimitiveRepresentation) using T = TypeParam; using Rep = typename T::rep; using namespace cudf::test; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT @@ -131,7 +131,7 @@ TYPED_TEST(ChronoColumnTest, ChronosCanBeComparedInDeviceCode) { using T = TypeParam; using namespace cudf::test; - using namespace simt::std::chrono; + using namespace cuda::std::chrono; auto start_lhs = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT auto start_rhs = milliseconds(-2400000000000); // Tue, 12 Dec 1893 05:20:00 GMT diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 587c0420df9..5202764c844 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -31,7 +31,7 @@ message(STATUS "Fetching jitify from ${SRC_JITIFY}") FetchContent_Declare( jitify GIT_REPOSITORY ${SRC_JITIFY} - GIT_TAG cudf_0.15 + GIT_TAG cudf_0.16 GIT_SHALLOW true ) @@ -45,14 +45,14 @@ set(JITIFY_INCLUDE_DIR "${jitify_SOURCE_DIR}" PARENT_SCOPE) ################################################################################################### # - libcudacxx ------------------------------------------------------------------------------------ -set(SRC_LIBCUDACXX "https://github.com/rapidsai/thirdparty-freestanding.git") +set(SRC_LIBCUDACXX "https://github.com/NVIDIA/libcudacxx.git") message(STATUS "Fetching libcudacxx from ${SRC_LIBCUDACXX}") FetchContent_Declare( libcudacxx GIT_REPOSITORY ${SRC_LIBCUDACXX} - GIT_TAG cudf + GIT_TAG 1.4.0 GIT_SHALLOW true )