| 例子 | 项目模板 | 文档 | 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或更高,由于支持流有序内存分配器。 ↩