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

[WIP][skip-ci] Opg python changes #846

Closed
wants to merge 6 commits into from
Closed
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- PR #736 cuHornet KTruss integration
- PR #735 Integration gunrock's betweenness centrality
- PR #760 cuHornet Weighted KTruss
- PR #846 OPG dask infrastructure

## Improvements
- PR #688 Cleanup datasets after testing on gpuCI
Expand Down
8 changes: 8 additions & 0 deletions cpp/include/algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,12 @@ void bfs(experimental::GraphCSR<VT, ET, WT> const &graph,
VT *predecessors,
const VT start_vertex,
bool directed = true);


/////////////////////////////////////////////////////////
template <typename VT, typename ET, typename WT>
void mg_pagerank_temp(experimental::GraphCSC<VT,ET,WT> const &graph,
WT* pagerank);
//////////////////////////////////////////////////////////

} //namespace cugraph
21 changes: 21 additions & 0 deletions cpp/src/link_analysis/pagerank.cu
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,24 @@ template void pagerank<int, int, double>(experimental::GraphCSC<int,int,double>
double alpha, double tolerance, int64_t max_iter, bool has_guess);

} //namespace cugraph



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace cugraph {

template <typename VT, typename ET, typename WT>
void mg_pagerank_temp(experimental::GraphCSC<VT,ET,WT> const &graph, WT* pagerank){

std::cout<<"\nINSIDE CPP\n";
std::cout<<graph.comm.get_rank()<<"\n";
std::cout<<graph.comm.get_p()<<"\n";
}

// explicit instantiation
template void mg_pagerank_temp<int, int, float>(experimental::GraphCSC<int,int,float> const &graph, float* pagerank);
template void mg_pagerank_temp<int, int, double>(experimental::GraphCSC<int,int,double> const &graph, double* pagerank);
} //namespace cugraph

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 changes: 2 additions & 0 deletions python/cugraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
from cugraph.proto.components import strong_connected_component
from cugraph.proto.structure import find_bicliques

from cugraph.opg.link_analysis.mg_pagerank_wrapper import mg_pagerank

# Versioneer
from ._version import get_versions
__version__ = get_versions()['version']
Expand Down
33 changes: 33 additions & 0 deletions python/cugraph/dask/common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2019-2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from cugraph.dask.common.comms import CommsContext, worker_state, default_comms

#from cugraph.dask.common.comms_utils import inject_comms_on_handle, \
# perform_test_comms_allreduce, perform_test_comms_send_recv, \
# perform_test_comms_recv_any_rank, \
# inject_comms_on_handle_coll_only, is_ucx_enabled

#from cugraph.dask.common.dask_arr_utils import to_sparse_dask_array # NOQA

#from cugraph.dask.common.dask_df_utils import get_meta # NOQA
#from cugraph.dask.common.dask_df_utils import to_dask_cudf # NOQA
#from cugraph.dask.common.dask_df_utils import to_dask_df # NOQA

#from cugraph.dask.common.part_utils import *

#from cuml.dask.common.utils import raise_exception_from_futures # NOQA
#from cuml.dask.common.utils import raise_mg_import_exception # NOQA
Loading