{"id":18272,"date":"2018-06-13T08:39:07","date_gmt":"2018-06-13T05:39:07","guid":{"rendered":"https:\/\/hgpu.org\/?p=18272"},"modified":"2018-06-13T08:39:07","modified_gmt":"2018-06-13T05:39:07","slug":"indigo-a-domain-specific-language-for-fast-portable-image-reconstruction","status":"publish","type":"post","link":"https:\/\/hgpu.org\/?p=18272","title":{"rendered":"Indigo: A Domain-Specific Language for Fast, Portable Image Reconstruction"},"content":{"rendered":"<p>Linear operators used in iterative methods like conjugate gradient have typically been implemented either as &quot;matrix-driven&quot; subroutines backed by explicit sparse or dense matrices, or as &quot;matrix-free&quot; subroutines that implement specific linear operations directly (e.g. FFTs). The matrix-driven approach is generally more portable because it can target widely available BLAS libraries, but it can be inefficient in terms of time and space complexity. In contrast, the matrix-free approach is more performant because it leverages structure in operations, but it requires each operator be re-implemented on each new platform. To increase performance and portability, we propose a hybrid approach that represents linear operators as expression trees. Leaf nodes in the tree are either matrix-free or matrix-driven operators, and interior nodes represent mathematical compositions (sums, products, transposes) or structural compositions (stacks, block diagonals, etc.) of the leaf operators. This representation enables expert-guided reordering and fusion transformations that can improve performance or reduce memory pressure. We implement our approach in a domain-specific language called Indigo. We assess Indigo on image reconstruction problems arising in four application areas: magnetic resonance imaging, ptychography, magnetic particle imaging, and fluorescent microscopy. We give performance results from vendor BLAS libraries, and we introduce specializations to Sparse BLAS routines that achieve near-Roofline performance on multi-core, many-core, and GPU systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linear operators used in iterative methods like conjugate gradient have typically been implemented either as &quot;matrix-driven&quot; subroutines backed by explicit sparse or dense matrices, or as &quot;matrix-free&quot; subroutines that implement specific linear operations directly (e.g. FFTs). The matrix-driven approach is generally more portable because it can target widely available BLAS libraries, but it can be [&hellip;]<\/p>\n","protected":false},"author":351,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[89,33,3],"tags":[14,207,1786,512,1483,172,845,807,20,1767,176],"class_list":["post-18272","post","type-post","status-publish","format-standard","hentry","category-nvidia-cuda","category-image-processing","category-paper","tag-cuda","tag-fft","tag-image-processing","tag-image-reconstruction","tag-intel-xeon-phi","tag-magnetic-resonance-imaging","tag-microscopy","tag-mri","tag-nvidia","tag-nvidia-geforce-gtx-titan-x","tag-package"],"views":2413,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/18272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/users\/351"}],"replies":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18272"}],"version-history":[{"count":0,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/18272\/revisions"}],"wp:attachment":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}