-
Notifications
You must be signed in to change notification settings - Fork 58
Add intro blog for STL Concurrency primitives GSoC 2025 project #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pmozil
wants to merge
2
commits into
compiler-research:master
Choose a base branch
from
pmozil:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,6 +261,30 @@ | |
potentially establishing a new standard for high-performance genomic data analysis. | ||
proposal: /assets/docs/Aditya_Pandey_GSoC2025.pdf | ||
mentors: Martin Vassilev, Jonas Rembser, Fons Rademakers, Vassil Vassilev | ||
|
||
- name: Petro Mozil | ||
photo: PetroMozil.jpeg | ||
info: "Google Summer of Code 2025 Contributor" | ||
email: [email protected] | ||
education: "Bachelor of Computer Science, Ukrainian Catholic University, Ukraine" | ||
github: "https://github.com/pmozil" | ||
active: 1 | ||
linkedin: "https://www.linkedin.com/in/petro-mozil-a94583170/" | ||
projects: | ||
- title: "Enabling support for STL concurrency primitives in CLAD" | ||
status: Ongoing | ||
description: | | ||
Clad recursively iterates over the syntax tree to check whether a given | ||
statement should be differentiated. Each function that is called from | ||
inside of a differentiated function should be differentiated as well, | ||
and so should any object method. The main issue for clad is that std::thread is an object, | ||
and thus as a type that should be differentiated However, std::thread shouldn’t | ||
be differentiated, the function inside of it should. | ||
Some of STL’s concurrency primitives face the same problem - | ||
the methods in them should not be differentiated, | ||
and only the location of where they were called should be preserved. | ||
proposal: /assets/docs/petro_mozil_promosal_GSoC_2025.pdf | ||
mentors: Martin Vassilev, David Lange | ||
|
||
- name: Salvador de la Torre Gonzalez | ||
info: "Google Summer of Code 2025 Contributor" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: "Compiler Research - Team - Petro Mozil" | ||
layout: gridlay | ||
excerpt: "Compiler Research: Team members" | ||
sitemap: false | ||
permalink: /team/PetroMozil | ||
email: [email protected] | ||
--- | ||
|
||
{% include team-profile.html %} |
50 changes: 50 additions & 0 deletions
50
_posts/2025-05-18-Supporting-STL-concurrency-primitives-in-clad.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: "Supporting STL Concurrency Primitives in CLAD" | ||
layout: post | ||
excerpt: "Support for STL concurrency features in CLAD is a useful feature for applications utilizing cpu threads. Many applications of autodifferentiation benefit from parallel or concurrent processing, and support for some STL concurrency primitives such as threads and basic synchronization primitives may considerably simplify the user's design." | ||
sitemap: false | ||
author: Petro Mozil | ||
permalink: blogs/gsoc25_/ | ||
banner_image: /images/blog/gsoc-banner.png | ||
date: 2025-05-18 | ||
tags: gsoc llvm clang audo-differentiation | ||
Check failure on line 10 in _posts/2025-05-18-Supporting-STL-concurrency-primitives-in-clad.md
|
||
--- | ||
|
||
## About me | ||
|
||
I am Petro Mozil, a student participating in the Google Summer of Code program in 2025. | ||
I will work on adding support of STL conurrency primitives to CLAD. | ||
|
||
## Problem description | ||
|
||
`Clad` is a plugin for automatic differentiation for the `clang` compiler. | ||
Automatic differentiation is a term for multiple techniques of deriving a mathematical function non-analytically. Some of the ways of doing this include simply calculating the derivatiev numberically or by deriving a function by a set of rules, symbolically. | ||
Check failure on line 21 in _posts/2025-05-18-Supporting-STL-concurrency-primitives-in-clad.md
|
||
|
||
`Clad` provides an interface that returns an object that containd the derivative of a given function. There might be problems with some functions, if they are to be derived. For example, one would not derive `printf`, and neither would they derive `std::tread` - those are exceptions, and should be handled differently from mathematical functions. | ||
|
||
The main goals of this project are to implement support for automatically derive functions that contain `std::thread` so that the user wouldn't have to separate the multi-processing logic from the mathematical functions - such a feature would be a great time-saver for production of multi-processing code. | ||
|
||
## Objectives | ||
|
||
The objectives for thi project include adding support for multiple objects in STL, such as `std::thread`, `std::atomic`, `std::mutex`. | ||
|
||
The first, and, likely, most important part of the project is to add support for `std::thread` - this will include deriving not the `std::thread` constructor, but deriving the function suppliend for the thread. | ||
|
||
Support for mutexes is a bit more straighforward - though `clad` creates a second object to represent the derived value, it shouldn't do so for a mutex. It is a matter of having a custom derivative for `std::mutex`. | ||
|
||
Atomics will likely involve moer effort - they would require custom derivatives for `compare_exchange` functions as well as their methods. | ||
|
||
If time allows, I would also like to add support for `std::condition_variable`, `std::lock_guard`, `std::unique_lock` and `std::jthread`, and most of those would also only involve a custom derivative. | ||
|
||
|
||
## Conclusion | ||
|
||
A a result of this project, support for the concurrency primitives is expected. Clad should seamlessly derive functions with concurrency primitives in them. | ||
Though this project does not focus on features immediately reuired from `clad`, it should result in making easier the lives of those, who use clad for high-perf computing. | ||
|
||
## Related links | ||
|
||
- [LLVM Repository](https://github.com/llvm/llvm-project) | ||
- [CLAD repository](https://github.com/vgvassilev/clad) | ||
- [Project description](https://hepsoftwarefoundation.org/gsoc/2025/proposal_Clad-STLConcurrency.html) | ||
- [My github](https://github.com/pmozil) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why non-analytically?