| 예 | 프로젝트 템플릿 | 선적 서류 비치 | Github 동작 |
|---|
GunRock 1은 GPU를 위해 특별히 설계된 그래프 프로세싱을위한 CUDA 라이브러리입니다. 정점 또는 에지 프론티어의 작업에 중점을 둔 높은 수준 , 벌크 동기/비동기식 데이터 중심 추상화를 사용합니다. Gunrock은 특히 미세한로드로드 밸런싱 영역에서 고성능 GPU 컴퓨팅 프리미티브 및 최적화 전략을 결합하여 성능과 표현성 사이의 균형을 달성합니다. 프로그래머가 작은 코드 크기와 최소한의 GPU 프로그래밍 지식을 가진 Node에서 많은 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);
}/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 } ,
}Gunrock은 캘리포니아 대학교의 리젠트 저작권입니다. 라이브러리, 예제 및 모든 소스 코드는 Apache 2.0에 따라 해제됩니다.
이 저장소는 https://github.com/gunrock/essentials에서 이동되었으며 이전의 역사는 태그와 master 브랜치 아래에 보존됩니다. Gunrock 및 Essentials에 대해 자세히 알아보십시오. 비전 논문 : 병렬 그래프 분석의 필수 요소. ↩
스트림 주문 메모리 할당자를 지원하기 때문에 권장 CUDA V11.5.1 이상 . ↩