| 例子 | 項目模板 | 文件 | github動作 |
|---|
Gunrock 1是一個用於GPU專門設計的圖形處理的CUDA庫。它使用高級同步/異步,以數據為中心的抽象,重點介紹了頂點或邊緣邊緣的操作。 Gunrock通過耦合高性能GPU計算基礎和優化策略,尤其是在細粒載荷平衡領域,通過使用高級編程模型,使程序員能夠快速開發新的圖形原始圖,從而在note gpus縮小node sips sips sige sige sige sige sige sign sige and gpus sprape gpu和simimal gpu sprogramss nek gpus cons 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工具包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算法。
我們首先使用初始源頂點準備前沿,以開始基於推動的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);
}包括/gunrock/算法/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 } ,
}Gunrock是加利福尼亞大學攝政的版權。庫,示例和所有源代碼均以Apache 2.0發布。
該存儲庫已從https://github.com/gunrock/essentials移動,並且先前的歷史記錄保留在標籤和master分支下。在我們的視覺論文中閱讀有關砲彈和必需品的更多信息:平行圖分析的基本內容。 ↩
推薦的CUDA v11.5.1或更高,由於支持流有序內存分配器。 ↩