| 例 | プロジェクトテンプレート | ドキュメント | githubアクション |
|---|
Gunrock 1は、GPU専用に設計されたグラフ処理用のCUDAライブラリです。頂点またはエッジフロンティアの操作に焦点を当てた、高レベルの、バルク同期/非同期、データ中心の抽象化を使用します。 Gunrockは、特に細粒の負荷分散の領域で、高性能GPUコンピューティングのプリミティブと最適化戦略を結合することにより、パフォーマンスと表現力のバランスを達成し、プログラマーが小さなコードサイズと最小限のGPUプログラミングを備えたノードで多くのGPUにスケーリングする新しいグラフプリミティブを迅速に開発できる高レベルのプログラミングモデルを備えています。
| 支店 | 目的 | バージョン | 状態 |
|---|---|---|---|
main | gunrock/essentialsから移植されたデフォルトのブランチは、公式リリースブランチとして機能します。 | 2.xx | アクティブ |
develop | gunrock/essentialsから移植された開発機能ブランチ。 | 2.xx | アクティブ |
master | gunrock/gunrockバージョン1.xxインターフェイスの以前のリリースブランチは、すべてのコミット履歴を保存します。 | 1.xx | 非推奨 |
dev | gunrock/gunrockの以前の開発ブランチ。現在、すべての変更がmasterにマージされました。 | 1.xx | 非推奨 |
Gunrockを構築する前に、システムにCUDA Toolkit 2がインストールされていることを確認してください。 NVIDIA/thrust 、 NVIDIA/cubなどの他の外部依存関係は、 cmakeを使用して自動的にフェッチされます。
git clone https://github.com/gunrock/gunrock.git
cd gunrock
mkdir build && cd build
cmake ..
make sssp # or for all algorithms, use: make -j$(nproc)
bin/sssp ../datasets/chesapeake/chesapeake.mtx詳細な説明については、完全なドキュメントをご覧ください。次の例は、Gunrockのデータ中心のバルク同期プログラミングモデルを使用した単純なAPIを示しています。GPUで幅広い検索を実装しています。この例では、 problem_tおよびenactor_t structを作成するセットアップフェーズをスキップし、実際のアルゴリズムに直接ジャンプします。
最初に、プッシュベースのBFSトラバーサルを開始するために、初期ソース頂点でフロンティアを準備します。単純なf->push_back(source)は、最初の反復に使用する初期頂点を配置します。
void prepare_frontier ( frontier_t * f,
gcuda:: multi_context_t & context) override {
auto P = this -> get_problem ();
f-> push_back (P-> param . single_source );
}次に、収束条件が満たされるまで反復する反復ループを開始します。条件が指定されていない場合、フロンティアが空のときにループが収束します。
void loop (gcuda:: multi_context_t & context) override {
auto E = this -> get_enactor (); // Pointer to enactor interface.
auto P = this -> get_problem (); // Pointer to problem (data) interface.
auto G = P-> get_graph (); // Graph that we are processing.
auto single_source = P-> param . single_source ; // Initial source node.
auto distances = P-> result . distances ; // Distances array for BFS.
auto visited = P-> visited . data (). get (); // Visited map.
auto iteration = this -> iteration ; // Iteration we are on.
// Following lambda expression is applied on every source,
// neighbor, edge, weight tuple during the traversal.
// Our intent here is to find and update the minimum distance when found.
// And return which neighbor goes in the output frontier after traversal.
auto search = [=] __host__ __device__ (
vertex_t const & source, // ... source
vertex_t const & neighbor, // neighbor
edge_t const & edge, // edge
weight_t const & weight // weight (tuple).
) -> bool {
auto old_distance =
math::atomic::min (&distances[neighbor], iteration + 1 );
return (iteration + 1 < old_distance);
};
// Execute advance operator on the search lambda expression.
// Uses load_balance_t::block_mapped algorithm (try others for perf. tuning.)
operators::advance::execute<operators:: load_balance_t ::block_mapped>(
G, E, search, context);
}include/gunrock/algorithms/bfs.hxx
私たちの仕事を引用してくれてありがとう。
@article { Wang:2017:GGG ,
author = { Yangzihao Wang and Yuechao Pan and Andrew Davidson
and Yuduo Wu and Carl Yang and Leyuan Wang and
Muhammad Osama and Chenshan Yuan and Weitang Liu and
Andy T. Riffel and John D. Owens } ,
title = { {G}unrock: {GPU} Graph Analytics } ,
journal = { ACM Transactions on Parallel Computing } ,
year = 2017 ,
volume = 4 ,
number = 1 ,
month = aug,
pages = { 3:1--3:49 } ,
doi = { 10.1145/3108140 } ,
ee = { http://arxiv.org/abs/1701.01170 } ,
acmauthorize = { https://dl.acm.org/doi/10.1145/3108140?cid=81100458295 } ,
url = { http://escholarship.org/uc/item/9gj6r1dj } ,
code = { https://github.com/gunrock/gunrock } ,
ucdcite = { a115 } ,
} @InProceedings { Osama:2022:EOP ,
author = { Muhammad Osama and Serban D. Porumbescu and John D. Owens } ,
title = { Essentials of Parallel Graph Analytics } ,
booktitle = { Proceedings of the Workshop on Graphs,
Architectures, Programming, and Learning } ,
year = 2022 ,
series = { GrAPL 2022 } ,
month = may,
pages = { 314--317 } ,
doi = { 10.1109/IPDPSW55747.2022.00061 } ,
url = { https://escholarship.org/uc/item/2p19z28q } ,
}ガンロックは、カリフォルニア大学の摂政の著作権です。ライブラリ、例、およびすべてのソースコードは、Apache 2.0でリリースされます。
このリポジトリはhttps://github.com/gunrock/essentysから移動しており、以前の履歴はタグとmasterブランチの下に保存されています。 GunrockとEssentialsの詳細については、Vision Paper:Essentials of Parallel Graph Analyticsをご覧ください。 ↩
推奨されるCUDA V11.5.1以上は、ストリーム順序付けされたメモリアロケーターのサポートにより。 ↩