[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-759642-105":59,"doc-detail-759642-en":129,"doc-similar-759642":160},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":122,"head_meta":124,"extra_data":126,"updated_unix":128},105,"en","gpu-libraries-get-more-for-less","GPU libraries - Get More for Less","","GPU libraries simplify GPU programming by improving portability and reducing error-proneness. The talk surveys general libraries such as CUB and Thrust, then covers numerical libraries including cuBLAS and cuRand, followed by domain-specific solutions like OpenMM and QUDA. Short code snippets demonstrate practical usage of these libraries in C++, Fortran, and Python, connecting common abstractions and real examples for working more effectively with GPUs.",{"@graph":69,"@context":121},[70,84,104],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/gpu-libraries-get-more-for-less/759642/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":98,"encodingFormat":97,"isAccessibleForFree":99,"interactionStatistic":100},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/gpu-libraries-get-more-for-less/759642.png","ImageObject",300,407,{"name":92,"@type":93},"OKfine","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28",true,{"@type":101,"interactionType":102,"userInteractionCount":8},"InteractionCounter",{"@type":103},"ViewAction",{"@type":105,"mainEntity":106},"FAQPage",[107,113,117],{"name":108,"@type":109,"acceptedAnswer":110},"What does the talk cover about GPU libraries?","Question",{"text":111,"@type":112},"It introduces general libraries (CUB, Thrust), numerical libraries (cuBLAS, cuRand), and domain-specific libraries (OpenMM, QUDA). It also shows short code snippets for C++, Fortran, and Python.","Answer",{"name":114,"@type":109,"acceptedAnswer":115},"How does CUB help with GPU parallel algorithms?",{"text":116,"@type":112},"CUB is a template library for parallel algorithms usable inside CUDA kernels. It provides efficient implementations across Nvidia GPU architectures, including warp, block, and system level algorithms.",{"name":118,"@type":109,"acceptedAnswer":119},"What is demonstrated in the CUB block-level reduction example?",{"text":120,"@type":112},"The example shows defining a block reduction type with shared memory optimization, loading data efficiently, performing the sum, and writing results from the appropriate thread.","https://schema.org",{"og:url":83,"og:type":123,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":125,"canonical":83},"index,follow",{"doc_id":127,"site_id":62},759642,1795891412,{"code":4,"msg":5,"data":130},{"doc_id":127,"user_id":131,"nickname":92,"user_avatar":132,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":133,"file_id":134,"file_url":135,"file_type":136,"file_size":137,"view_count":8,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":138,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":128,"read_time":41,"preview_page_count":19,"preview_urls":143},962093957596,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","GPU libraries—Get More for Less  \nJan H. Meinke | 18.02.2020  \nAbstract: GPU libraries come in many shapes and sizes. They make GPU programming easier, more portable, and less error prone. In this talk, I start with very general libraries such as CUB and Thrust, present some ofthe numerical libraries like cuBLAS and cuRand, and give examples of domain specific libraries such as OpenMM and QUDA. Short code snippets illustrate how to use GPU libraries from C++, Fortran, and Python.  \nWe have seen in Ben Cummings talk how CSCS uses libraries to provide common abstractions for porting applications. In this talks, I will introduce some libraries that make working with GPUs easier. Several ofthese libraries deserve a talk (or a course) of their own, but I hope I can give you a taste.  \nCUDA unbound (CUB)  \nWhen CUDA was first released you had to write your own kernel. If you needed to perform a reduction in your code, you wrote your own reduction algorithm. But cooperative parallel programming is hard and an optimal reduction algorithm for a Kepler GPU like the K80 on JURECA looks different from an optimal implementation on a Volta GPU on JUWELS.  \nCUB is a template library for parallel algorithms that we can use from within our CUDA kernels that provides optimal implementations of various algorithms for all available Nvidia GPU architectures. It provides warp, block, and system level algorithms. CUB uses some additional abstractions for flexibility and is very powerful.  \nC++ Template library with warp-, block, and device-level implementations.  \nOptimized for all Nvidia GPU architectures Includes  \n Reduction  \n Scan  \n Histograms  \n and more  \nIf we are using hip, we can use hipCUB. It will use rocPRIM on an AMD platform and CUB on a CUDA platform.  \nCUB  \nBlock-level reduction  \nLet’s take a look at a block-level reduction:  \n  global   void BlockReduce (double* in , double* out){  \n// Use a block with 256 th reads  \nusing BlockReduceT = BlockReduce\u003Cdouble , 256> ;  \n  shared   typename BlockReduceT : :TempStorage temp ;  \n// Load 4 items per th read  \ndouble data [4] ;  \nLoadDi rectSt riped\u003C 256> (th readIdx .x , in , data ) ;  \ndouble mySum = BlockReduceT (temp .Sum (data ) ) ;  \nif (th readIdx .x == 0){  \n*out = mySum ;  \n}  \n}  \nWe first define the type of block reduce that we want to perform. Here we’ll sum up doubles using 256 threads per block. The block reduce uses shared memory to optimize the reduction. It defines it’s own type TempStorage to do that. To load the data efficiently, we use LoadDirectStriped and pass the block size, our thread ID and the storage spaces. Finally, we perform the sum. Thread 0 accumulates the result and returns it. If we were using multiple blocks, each would write its result to a result array instead of a single value, e.g.,  \nif (th readIdx .x == 0){  \nout [blockIdx .x ] = mySum ;}  \nCUB  \nTemplate parameters  \nThere are a couple of hardcoded parameters in the code. The most notable may be the block size. What do I do ifI need a smaller or bigger block size? I could write a new kernel, but there is a more convenient way: I can use template paramters.  \ntemplate \u003C int Th readsPerBlock>  \n  global   void BlockReduce (double* in , double* out){  \n// Use a block with Th readsPerBlock th reads  \nusing BlockReduceT = BlockReduce \u003Cdouble , Th readsPerBlock> ;  \n  shared   typename BlockReduceT : :TempStorage temp ;  \n// Load 4 items per th read  \ndouble data [4] ;  \nLoadDi rectSt riped\u003CTh readsPerBlock> (th readIdx .x , in , data ) ;  \ndouble mySum = BlockReduceT (temp) ;  \nif (th readIdx .x == 0){  \n*out = mySum ;  \n}  \n}  \n// Call the kernel f rom the host  \nBlockReduce\u003C 256>\u003C\u003C\u003C1 , 256>>> (in , out) ;  \nWe can adjust other parameters, too, for example, the number of data items to load per thread or the algorithm used for the reduction. Each would be passed as a template parameter. The advantage of using template parameters is that they are resolved at compile time and don’t entail any run time ","cbCaiflmsmoEQPIb","https://ap.wps.com/l/cbCaiflmsmoEQPIb","pdf",383297,12,"English","# CUDA unbound (CUB)\n## Block-level reduction\n# CUB\n## Template parameters\n## Device functions\n# Thrust","[{\"question\":\"What does the talk cover about GPU libraries?\",\"answer\":\"It introduces general libraries (CUB, Thrust), numerical libraries (cuBLAS, cuRand), and domain-specific libraries (OpenMM, QUDA). It also shows short code snippets for C++, Fortran, and Python.\"},{\"question\":\"How does CUB help with GPU parallel algorithms?\",\"answer\":\"CUB is a template library for parallel algorithms usable inside CUDA kernels. It provides efficient implementations across Nvidia GPU architectures, including warp, block, and system level algorithms.\"},{\"question\":\"What is demonstrated in the CUB block-level reduction example?\",\"answer\":\"The example shows defining a block reduction type with shared memory optimization, loading data efficiently, performing the sum, and writing results from the appropriate thread.\"}]","GPU libraries - Get More for Less | PDF",[144,148,152,156],{"page_no":8,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/f19641d85dd4a35cce5a6bde013671c2.webp",983,1391,{"page_no":14,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/e9d69ce32db559dbf1bc26e15626c56c.webp",982,1389,{"page_no":81,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/d5558072c1be106318ccf0aa6c18a5c1.webp",981,1388,{"page_no":19,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/9dc27b0c6f0135f39a76140f896cd59d.webp",980,1387,{"list":161,"token":66},[162,168,174,180,186,192,198,205,211,217],{"doc_id":163,"doc_title":164,"file_type":136,"home_preview_img_url":165,"slug":166,"view_count":29,"category_name":30,"create_tm":167},698089,"Qualcomm Snapdragon Mobile Platform OpenCL General Programming and Optimization - Revision A - Initial release","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010188385/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=SCW3t150Emr3%2BUioDLuqBgsBgF4%3D","qualcomm-snapdragon-mobile-platform-opencl-general-programming-and-optimization-revision-a-initial-release",1794448075,{"doc_id":169,"doc_title":170,"file_type":136,"home_preview_img_url":171,"slug":172,"view_count":81,"category_name":30,"create_tm":173},698127,"Using GPUs at the CHPC - SLURM and GPU Job Workflow Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010204243/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=5qFUBPfAi%2F2GnWEN1ybN8Bp5l9k%3D","using-gpus-at-the-chpc-slurm-and-gpu-job-workflow-guide",1794448652,{"doc_id":175,"doc_title":176,"file_type":136,"home_preview_img_url":177,"slug":178,"view_count":19,"category_name":30,"create_tm":179},685948,"Recommended Graphic Cards - Intel Graphics cards are not supported with Element 3D - NVidia GPUs on Mac OSX Mojave are not supported due to graphics driver limitations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999721823/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=WP4tXHWdqFTdZVlYLT%2BSop0Xm8M%3D","recommended-graphic-cards-intel-graphics-cards-are-not-supported-with-element-3d-nvidia-gpus-on-mac-osx-mojave-are-not-supported-due-to-graphics-driver-limitations",1794023221,{"doc_id":181,"doc_title":182,"file_type":136,"home_preview_img_url":183,"slug":184,"view_count":39,"category_name":30,"create_tm":185},656164,"Exploring the GPU Architecture - Overview - To Conclude","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975302086/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=mn36KR4ItMNzwmfgfHeL7q8CErA%3D","exploring-the-gpu-architecture-overview-to-conclude",1792966818,{"doc_id":187,"doc_title":188,"file_type":136,"home_preview_img_url":189,"slug":190,"view_count":24,"category_name":30,"create_tm":191},685892,"Medusa - Simplified Graph Processing on GPUs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000264962/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=d4ruZKjN%2BZmz0FGuyu4vAfXB9vA%3D","medusa-simplified-graph-processing-on-gpus",1794021609,{"doc_id":193,"doc_title":194,"file_type":136,"home_preview_img_url":195,"slug":196,"view_count":41,"category_name":30,"create_tm":197},120316,"A Comprehensive Guide to Combining R and Python code for Data Science, Machine Learning and Reinforcement Learning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835328263/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=FQcWuvGHbHzJgIx5J0ikx8BTgAk%3D","a-comprehensive-guide-to-combining-r-and-python-code-for-data-science-machine-learning-and-reinforcement-learning",1785729417,{"doc_id":199,"doc_title":200,"file_type":136,"home_preview_img_url":201,"slug":202,"view_count":203,"category_name":30,"create_tm":204},81969,"An Introduction and Tutorial for the Beagle Framework","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808657397/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=fm533h8c4v%2FJd4JEJn7sb%2FvyOCE%3D","an-introduction-and-tutorial-for-the-beagle-framework",23,1784177334,{"doc_id":206,"doc_title":207,"file_type":136,"home_preview_img_url":208,"slug":209,"view_count":52,"category_name":30,"create_tm":210},672776,"NVIDIA A100 Tensor Core GPU - Datasheet - Jun20","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229989600587/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=Q4NKka1SFi2pn671AqiV%2FSRa4Uk%3D","nvidia-a100-tensor-core-gpu-datasheet-jun20",1793607139,{"doc_id":212,"doc_title":213,"file_type":136,"home_preview_img_url":214,"slug":215,"view_count":19,"category_name":30,"create_tm":216},685896,"GP-GPU - Parallel Pattern - Lecture 5","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000265095/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=PbxdJNOzUhZrEijFlFdPqWrev4k%3D","gp-gpu-parallel-pattern-lecture-5",1794021619,{"doc_id":218,"doc_title":219,"file_type":136,"home_preview_img_url":220,"slug":221,"view_count":19,"category_name":30,"create_tm":222},687539,"PYTHON AND PYCHARM - Introduction to Python - Why Python? - Virtual Environment - Basic Packages Managing - Anaconda - Python IDE + Miniconda = PyCharm - New Project","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000649342/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=Rtee9iNW75vyaMhG9Zs%2FVkJ679Y%3D","python-and-pycharm-introduction-to-python-why-python-virtual-environment-basic-packages-managing-anaconda-python-ide-miniconda-pycharm-new-project",1794084032]