Skip to content

Commit 373a1fb

Browse files
gojakuchvgvassilev
andauthored
Add the Kokkos+Clad project introduction blogpost (#200)
* Add the Kokkos+Clad project introduction blogpost * Add tags to the Kokkos+Clad project introduction blogpost Co-authored-by: Vassil Vassilev <[email protected]> --------- Co-authored-by: Vassil Vassilev <[email protected]>
1 parent 7dc7a81 commit 373a1fb

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: "Implementing Differentiation of the Kokkos Framework in Clad"
3+
layout: post
4+
excerpt: "A GSoC 2024 project aimed at implementing the differentiation of the Kokkos framework into Clad"
5+
sitemap: false
6+
author: Atell Yehor Krasnopolski
7+
permalink: blogs/gsoc24_atell_krasnopolsky_introduction_blog/
8+
date: 2024-05-26
9+
tags: gsoc clang llvm clad
10+
---
11+
12+
### Introduction
13+
14+
I'm Atell Krasnopolski, a mathematics student at the University of Wuerzburg, Germany, and a Google Summer of Code 2024 contributor for a project related to Clad, an automatic differentiation tool developed by the Compiler Research group. Specifically, I am going to be implementing the differentiation of the Kokkos framework into Clad.
15+
16+
**Mentors**: Vaibhav Thakkar, Vassil Vassilev, Petro Zarytskyi
17+
18+
### Briefly about Kokkos and Clad
19+
20+
In mathematics and computer algebra, automatic differentiation (AD) is a set of techniques
21+
to numerically evaluate the derivative of a function specified by a computer program.
22+
Automatic differentiation is an alternative technique to Symbolic differentiation and Numerical
23+
differentiation (the method of finite differences). Clad is based on Clang which provides the
24+
necessary facilities for code transformation. The AD library can differentiate non-trivial
25+
functions, to find a partial derivative for trivial cases and has good unit test coverage.
26+
27+
The Kokkos C++ Performance Portability Ecosystem is a production level solution for writing
28+
modern C++ applications in a hardware-agnostic way. It is part of the US Department of
29+
Energies Exascale Project – the leading effort in the US to prepare the HPC community for
30+
the next generation of supercomputing platforms. The Ecosystem consists of multiple
31+
libraries addressing the primary concerns for developing and maintaining applications in a
32+
portable way. The three main components are the Kokkos Core Programming Model, the
33+
Kokkos Kernels Math Libraries and the Kokkos Profiling and Debugging Tools.
34+
35+
The Kokkos framework is used in several domains including climate modelling where
36+
gradients are an important part of the simulation process. This project aims at teaching Clad
37+
to differentiate Kokkos entities in a performance-portable way.
38+
39+
### Why I Chose This Project
40+
41+
Long story short, I have always been interested in the algorithms at the intersection of computer science and mathematics. In fact, topics like numerical and computational mathematics have sparked my initial interest in mathematics as my university major. Thus, having such an opportunity to work on a project that combines some low-level programming, applied mathematics, and more was a dream from my high school years.
42+
43+
### Implementation Details and Plans
44+
45+
The goal is to implement the differentiation of the Kokkos high-performance computing
46+
framework including the support of:
47+
48+
- Kokkos functors,
49+
- Kokkos lambdas,
50+
- Kokkos methods such as parallel_for, parallel_reduce and deep_copy,
51+
- as well as the general support for Kokkos::View data structures,
52+
- Enhance existing benchmarks demonstrating effectiveness of Clad for Kokkos
53+
54+
The additional aim of the project is to implement a generic approach to support any C++
55+
library (starting with Kokkos) in such a way that the core of Clad is invariant to the internals
56+
of the library, but any Clad user can add it in a pluggable format for individual use cases.
57+
This ensures Clad’s usability for bigger projects that may include a lot of libraries.
58+
59+
To make Kokkos differentiable in Clad, one would need to be able to propagate pullbacks and
60+
pushforwards through its constructs (at least those listed above), which is the goal of this project.
61+
62+
### Conclusion
63+
64+
This project represents a unique intersection of mathematics, computer science, and high-performance computing. By extending Clad to support the differentiation of Kokkos entities, we will not only enhance the capabilities of Clad but also provide a valuable tool for the scientific and engineering communities that rely on Kokkos for their simulations and computations. The successful integration of Kokkos with Clad will allow for more efficient and accurate gradient calculations which are essential in fields such as climate modelling and other simulation-heavy domains.
65+
66+
### Related Links
67+
68+
- [Clad Repository](https://github.com/vgvassilev/clad)
69+
- [Kokkos Framework](https://kokkos.org/)
70+
- [GSoC Project Proposal](https://summerofcode.withgoogle.com/media/user/7bacecfd1611/proposal/gAAAAABmU0YUILyYTMPRrcmjcv31gQbse1K2pvtrZjJbfFJ-BpANfpBikwSOTM52mNTLxKQeOP-rdhfyqu7KSO-pe74cM18zatTIu6VI4EJzPW8FgNbD8l4=.pdf)
71+
- [My GitHub Profile](https://github.com/gojakuch)

0 commit comments

Comments
 (0)