Skip to content

Commit 13341d5

Browse files
committed
Add the Kokkos+Clad project introduction blogpost
1 parent a5480c5 commit 13341d5

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
---
10+
11+
### Introduction
12+
13+
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.
14+
15+
**Mentors**: Vaibhav Thakkar, Vassil Vassilev, Petro Zarytskyi
16+
17+
### Briefly about Kokkos and Clad
18+
19+
In mathematics and computer algebra, automatic differentiation (AD) is a set of techniques
20+
to numerically evaluate the derivative of a function specified by a computer program.
21+
Automatic differentiation is an alternative technique to Symbolic differentiation and Numerical
22+
differentiation (the method of finite differences). Clad is based on Clang which provides the
23+
necessary facilities for code transformation. The AD library can differentiate non-trivial
24+
functions, to find a partial derivative for trivial cases and has good unit test coverage.
25+
26+
The Kokkos C++ Performance Portability Ecosystem is a production level solution for writing
27+
modern C++ applications in a hardware-agnostic way. It is part of the US Department of
28+
Energies Exascale Project – the leading effort in the US to prepare the HPC community for
29+
the next generation of supercomputing platforms. The Ecosystem consists of multiple
30+
libraries addressing the primary concerns for developing and maintaining applications in a
31+
portable way. The three main components are the Kokkos Core Programming Model, the
32+
Kokkos Kernels Math Libraries and the Kokkos Profiling and Debugging Tools.
33+
34+
The Kokkos framework is used in several domains including climate modelling where
35+
gradients are an important part of the simulation process. This project aims at teaching Clad
36+
to differentiate Kokkos entities in a performance-portable way.
37+
38+
### Why I Chose This Project
39+
40+
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.
41+
42+
### Implementation Details and Plans
43+
44+
The goal is to implement the differentiation of the Kokkos high-performance computing
45+
framework including the support of:
46+
47+
- Kokkos functors,
48+
- Kokkos lambdas,
49+
- Kokkos methods such as parallel_for, parallel_reduce and deep_copy,
50+
- as well as the general support for Kokkos::View data structures,
51+
- Enhance existing benchmarks demonstrating effectiveness of Clad for Kokkos
52+
53+
The additional aim of the project is to implement a generic approach to support any C++
54+
library (starting with Kokkos) in such a way that the core of Clad is invariant to the internals
55+
of the library, but any Clad user can add it in a pluggable format for individual use cases.
56+
This ensures Clad’s usability for bigger projects that may include a lot of libraries.
57+
58+
To make Kokkos differentiable in Clad, one would need to be able to propagate pullbacks and
59+
pushforwards through its constructs (at least those listed above), which is the goal of this project.
60+
61+
### Conclusion
62+
63+
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.
64+
65+
### Related Links
66+
67+
- [Clad Repository](https://github.com/vgvassilev/clad)
68+
- [Kokkos Framework](https://kokkos.org/)
69+
- [GSoC Project Proposal](https://summerofcode.withgoogle.com/media/user/7bacecfd1611/proposal/gAAAAABmU0YUILyYTMPRrcmjcv31gQbse1K2pvtrZjJbfFJ-BpANfpBikwSOTM52mNTLxKQeOP-rdhfyqu7KSO-pe74cM18zatTIu6VI4EJzPW8FgNbD8l4=.pdf)
70+
- [My GitHub Profile](https://github.com/gojakuch)

0 commit comments

Comments
 (0)