Extending OpenMP for Machine Learning-Driven Adaptation
Parallel Programming Languages and Models
TimeSunday, 14 November 20212:30pm - 3pm CST
DescriptionOpenMP 5.0 introduced themetadirectivedirective to sup-port compile-time selection from a set of directive variants based onOpenMP context. OpenMP 5.1 extended context information to include user-defined conditions that enable user-guided runtime adaptation. How-ever, defining conditions that capture the complex interactions between applications and hardware platforms to select an optimized variant is challenging for programmers. This paper explores a novel approach to automate runtime adaptation through machine learning. In particular,we design a new omp declare adaptation directive and its associated clauses to describe semantics for model-driven adaptation and also develop a prototype source-to-source transformation tool for evaluating our runtime adaptation approach. Leveraging an existing runtime library for tuning, we design a small set of API functions to support our source-to-source compiler transformations. Our evaluation, using the Smith-Waterman algorithm as a use-case, demonstrates that the proposed adap-tive OpenMP extension automatically chooses the code variants that deliver the best performance in heterogeneous platforms that consists ofCPU and GPU processing capabilities. Using decision tree models for tuning has an accuracy of up to 93.1% in selecting the optimal variant,with negligible runtime overhead.