Skip to content

Commit

Permalink
Merge branch 'branch-23.08' into sampling_updates_for_23.08
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHastings committed Jul 18, 2023
2 parents 7409c8e + 32e6e51 commit ae962b1
Show file tree
Hide file tree
Showing 13 changed files with 579 additions and 131 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
Expand All @@ -39,6 +40,7 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
Expand All @@ -61,7 +63,7 @@ jobs:
arch: "amd64"
branch: ${{ inputs.branch }}
build_type: ${{ inputs.build_type || 'branch' }}
container_image: "rapidsai/ci:latest"
container_image: "rapidsai/ci:cuda11.8.0-ubuntu22.04-py3.10"
date: ${{ inputs.date }}
node_type: "gpu-v100-latest-1"
run_script: "ci/build_docs.sh"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,29 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: pull-request
node_type: cpu16
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: pull-request
conda-notebook-tests:
needs: conda-python-build
Expand All @@ -63,7 +67,7 @@ jobs:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
container_image: "rapidsai/ci:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/test_notebooks.sh"
docs-build:
needs: conda-python-build
Expand All @@ -73,7 +77,7 @@ jobs:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
container_image: "rapidsai/ci:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/build_docs.sh"
wheel-build-pylibcugraph:
needs: checks
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
Expand All @@ -26,6 +27,7 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
matrix_filter: map(select(.CUDA_VER | startswith("11")))
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
Expand Down
16 changes: 14 additions & 2 deletions cpp/include/cugraph/utilities/device_functors.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,28 @@ struct pack_bool_t {
}
};

template <typename Iterator>
template <typename index_t, typename Iterator>
struct indirection_t {
Iterator first{};

__device__ typename thrust::iterator_traits<Iterator>::value_type operator()(size_t i) const
__device__ typename thrust::iterator_traits<Iterator>::value_type operator()(index_t i) const
{
return *(first + i);
}
};

template <typename index_t, typename Iterator>
struct indirection_if_idx_valid_t {
Iterator first{};
index_t invalid_idx{};
typename thrust::iterator_traits<Iterator>::value_type invalid_value{};

__device__ typename thrust::iterator_traits<Iterator>::value_type operator()(index_t i) const
{
return (i != invalid_idx) ? *(first + i) : invalid_value;
}
};

template <typename T>
struct not_equal_t {
T compare{};
Expand Down
5 changes: 3 additions & 2 deletions cpp/libcugraph_etl/include/hash/concurrent_unordered_map.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/detail/utilities/device_atomics.cuh>
#include <cudf/detail/utilities/hash_functions.cuh>
#include <cudf/hashing/detail/default_hash.cuh>
#include <cudf/hashing/detail/hash_functions.cuh>
#include <cudf/utilities/error.hpp>

#include <rmm/cuda_stream_view.hpp>
Expand Down Expand Up @@ -118,7 +119,7 @@ union pair_packer<pair_type, std::enable_if_t<is_packable<pair_type>()>> {
*/
template <typename Key,
typename Element,
typename Hasher = cudf::detail::default_hash<Key>,
typename Hasher = cudf::hashing::detail::default_hash<Key>,
typename Equality = equal_to<Key>,
typename Allocator = default_allocator<thrust::pair<Key, Element>>>
class concurrent_unordered_map {
Expand Down
6 changes: 6 additions & 0 deletions cpp/src/community/detail/common_methods.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <community/detail/common_methods.hpp>

#include <detail/graph_partition_utils.cuh>
#include <prims/kv_store.cuh>
#include <prims/per_v_transform_reduce_dst_key_aggregated_outgoing_e.cuh>
#include <prims/per_v_transform_reduce_incoming_outgoing_e.cuh>
#include <prims/reduce_op.cuh>
Expand All @@ -42,6 +43,11 @@

CUCO_DECLARE_BITWISE_COMPARABLE(float)
CUCO_DECLARE_BITWISE_COMPARABLE(double)
// FIXME: a temporary workaround for a compiler error, should be deleted once cuco gets patched.
namespace cuco {
template <>
struct is_bitwise_comparable<cuco::pair<int32_t, float>> : std::true_type {};
} // namespace cuco

namespace cugraph {
namespace detail {
Expand Down
5 changes: 5 additions & 0 deletions cpp/src/community/detail/refine_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@

CUCO_DECLARE_BITWISE_COMPARABLE(float)
CUCO_DECLARE_BITWISE_COMPARABLE(double)
// FIXME: a temporary workaround for a compiler error, should be deleted once cuco gets patched.
namespace cuco {
template <>
struct is_bitwise_comparable<cuco::pair<int32_t, float>> : std::true_type {};
} // namespace cuco

namespace cugraph {
namespace detail {
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/prims/detail/nbr_intersection.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ nbr_intersection(raft::handle_t const& handle,
.get_stream()); // initially store minimum degrees (upper bound for intersection sizes)
if (intersect_minor_nbr[0] && intersect_minor_nbr[1]) {
auto second_element_to_idx_map =
detail::kv_cuco_store_device_view_t((*major_to_idx_map_ptr)->view());
detail::kv_cuco_store_find_device_view_t((*major_to_idx_map_ptr)->view());
thrust::transform(
handle.get_thrust_policy(),
get_dataframe_buffer_begin(vertex_pair_buffer),
Expand Down Expand Up @@ -1005,7 +1005,7 @@ nbr_intersection(raft::handle_t const& handle,
handle.get_stream());
if (intersect_minor_nbr[0] && intersect_minor_nbr[1]) {
auto second_element_to_idx_map =
detail::kv_cuco_store_device_view_t((*major_to_idx_map_ptr)->view());
detail::kv_cuco_store_find_device_view_t((*major_to_idx_map_ptr)->view());
thrust::tabulate(
handle.get_thrust_policy(),
rx_v_pair_nbr_intersection_sizes.begin(),
Expand Down
Loading

0 comments on commit ae962b1

Please sign in to comment.