[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-117947-en":3,"doc-seo-117947-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},117947,1649267921044,"Ava Thompson","https://us-avatar.wpscdn.com/avatar/1800007509477c92dfb?_k=1786009248482753345",8,"Research & Report","Machine Learning Algorithms using Performance Portability Framework for - Python - Master of Science in Engineering Report","The report examines the feasibility of implementing machine learning algorithms in Python using PyKokkos, a framework that translates portable Python kernels into C++ Kokkos at runtime. It analyzes performance differences for common machine-learning primitives such as variance, logarithm, and transpose, comparing PyKokkos against NumPy. It further implements Scikit-learn’s Gaussian Naive Bayes and Logistic Regression with PyKokkos and discusses how execution-policy choices affect runtime. Results indicate potentially significant performance gains for individual functions while motivating further work to support efficient end-to-end algorithms.","The Report Committee for Umair Shahzad certifies that this is the approved version of the following report:  \nMachine Learning Algorithms using Performance Portability Framework for  \nPython  \nSUPERVISING COMMITTEE:  \nMilos Gligoric, Supervisor  \nGeorge Biros  \nMachine Learning Algorithms using Performance Portability  \nFramework for Python  \nby  \nUmair Shahzad  \nReport:  \nPresented to the Faculty of the Graduate School of The University of Texas at Austin in Partial Fulfillment  \nof the Requirements  \nfor the Degree of  \nMASTER OF SCIENCE IN ENGINEERING  \nTHE UNIVERSITY OF TEXAS AT AUSTIN  \nDecember 2022  \nAcknowledgments  \nI would like to express my gratitude to my advisor Dr. Milos Gligoric for his mentorship as well as my labmates, Nader Al Awar and Pengyu Nie, for providing me with all the resources and insights for pursuing this project, and writing this report. Finally, thank you to my family and friends for their help and support during my masters.  \nMachine Learning Algorithms using Performance Portability Framework for  \nPython  \nUmair Shahzad, M.S.E.  \nThe University of Texas at Austin, 2022  \nSupervisor: Milos Gligoric  \nIn the past decade, C++ has emerged as one of the main languages for high performance computing. Frameworks such as OpenMP [4], CUDA [10], and HIP [13] target different hardware architectures and have different APIs. The Kokkos [7] programming model provides a way to abstract the underlying APIs for different architectures and build code for different targets by configuring at c ompile t ime. Python p rogramming l anguage, o n t he other hand, is one of the top choices for developers today because of its ease of use and the fact that most recent machine learning and data science libraries are developed targeting this language. To provide performance portability in Python as well, PyKokkos [11, 12] was developed. PyKokkos allows developers to write portable kernels which are translated to C++ Kokkos at runtime.  \nThis report provides an insight into the feasibility of implementing machine learning algorithms using PyKokkos. We first l ook i nto t he performance difference in commonly used functions in basic machine learning al-  \ngorithms like, variance, log, transpose, etc. when implemented in PyKokkos as compared to NumPy [9] . We then implement Scikit-learn’s [6] Gaussian Naive Bayes and Logistic Regression using PyKokkos, and discuss the performance differences in the two implementations. The results show evidence that performance gains from using PyKokkos can be significant for individual functions, and further work is needed to enable efficient algorithms.  \nContents  \nAcknowledgments iii  \nAbstract iv  \nList of Tables viii  \nList of Figures ix  \n1 Introduction 1  \n2 Background 3  \n2.1 Writing a Parallel For Kernel using PyKokkos ......... 3  \n2.2 Writing a Parallel Reduce Kernel using PyKokkos ....... 5  \n2.3 PyKokkos Execution Policy ................... 6  \n2.3.1 RangePolicy ........................ 6  \n2.3.2 TeamPolicy ........................ 6  \n2.4 Scikit-learn ............................ 8  \n3 Technique 9  \n3.1 Collecting Functions ....................... 9  \n3.2 Implementing Commonly Used Functions in Machine Learning Algorithms with PyKokkos .................... 12  \n3.3 Implementing Machine Learning Algorithms .......... 18  \n4 Evaluation 21  \n4.1 Benchmarking Functions ..................... 21  \n4.2 Replacing RangePolicy with TeamPolicy ........... 25  \n4.3 Benchmarking the Algorithms .................. 27  \n5 Future Work 29  \n5.1 GPU Based Performance Benchmarks .............. 29  \n5.2 Reduction Operators ....................... 29  \n5.3 Broadcasting ........................... 30  \n5.4 Implementing Nested Library Functions ............. 30  \n6 Conclusion 32  \n7 Appendix 33  \nReferences 37  \nVita 40  \nList of Tables  \n1 List of functions that was discovered in Scikit-learn....... 10  \n2 Performance comparison against NumPy (mean [ms]) ...... 22  \n3 TeamPolicy performance compariso","cbCainPDBELQJ7zo","https://ap.wps.com/l/cbCainPDBELQJ7zo","pdf",323810,1,49,"English","en",105,"# 1 Introduction\n# 2 Background\n## 2.1 Writing a Parallel For Kernel using PyKokkos\n## 2.2 Writing a Parallel Reduce Kernel using PyKokkos\n## 2.3 PyKokkos Execution Policy\n## 2.4 Scikit-learn\n# 3 Technique\n## 3.1 Collecting Functions\n## 3.2 Implementing Commonly Used Functions in Machine Learning Algorithms with PyKokkos\n## 3.3 Implementing Machine Learning Algorithms\n# 4 Evaluation\n## 4.1 Benchmarking Functions\n## 4.2 Replacing RangePolicy with TeamPolicy\n## 4.3 Benchmarking the Algorithms\n# 5 Future Work\n## 5.1 GPU Based Performance Benchmarks\n## 5.2 Reduction Operators\n## 5.3 Broadcasting\n## 5.4 Implementing Nested Library Functions\n# 6 Conclusion\n# 7 Appendix\n# References\n# Vita","[{\"question\":\"What problem does the report address about performance portability in Python?\",\"answer\":\"C++ frameworks like CUDA, OpenMP, and HIP target different hardware with different APIs, making code hard to run across architectures. The report uses Kokkos/PyKokkos to enable portable Python kernels and compare performance against NumPy.\"},{\"question\":\"Which parts of machine learning performance are evaluated in the report?\",\"answer\":\"The study benchmarks commonly used functions in basic machine learning workflows (e.g., variance, log, transpose) implemented in PyKokkos and compares them to NumPy.\"},{\"question\":\"How are Gaussian Naive Bayes and Logistic Regression handled in the PyKokkos approach?\",\"answer\":\"The report implements Scikit-learn’s Gaussian Naive Bayes and Logistic Regression using PyKokkos and analyzes the resulting performance differences between the two implementations.\"}]","Machine Learning Algorithms using Performance Portability Framework for - Python - Master of Science in Engineering Report | PDF",1785680489,123,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"machine-learning-algorithms-using-performance-portability-framework-for-python-master-of-science-in-engineering-report","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/machine-learning-algorithms-using-performance-portability-framework-for-python-master-of-science-in-engineering-report/117947/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-02",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does the report address about performance portability in Python?","Question",{"text":75,"@type":76},"C++ frameworks like CUDA, OpenMP, and HIP target different hardware with different APIs, making code hard to run across architectures. The report uses Kokkos/PyKokkos to enable portable Python kernels and compare performance against NumPy.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Which parts of machine learning performance are evaluated in the report?",{"text":80,"@type":76},"The study benchmarks commonly used functions in basic machine learning workflows (e.g., variance, log, transpose) implemented in PyKokkos and compares them to NumPy.",{"name":82,"@type":73,"acceptedAnswer":83},"How are Gaussian Naive Bayes and Logistic Regression handled in the PyKokkos approach?",{"text":84,"@type":76},"The report implements Scikit-learn’s Gaussian Naive Bayes and Logistic Regression using PyKokkos and analyzes the resulting performance differences between the two implementations.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]