diff --git a/.github/actions/spelling/allow/names.txt b/.github/actions/spelling/allow/names.txt index edbeaba7..b2ecec34 100644 --- a/.github/actions/spelling/allow/names.txt +++ b/.github/actions/spelling/allow/names.txt @@ -1,4 +1,5 @@ Abdulrasool +Abdelrhman Abhigyan Alexandru Alja @@ -16,6 +17,7 @@ Corlay Couet Dmitry Duswald +Elrawy Foco Graenitz Guilherme @@ -89,6 +91,7 @@ Yuquan Zarytskyi aaronj aaronjomyjoseph +abdelrhman abhi acherjan acherjee @@ -118,6 +121,7 @@ daemondzh davidlange dlange efremale +elrawy fransham fsfod gargvaibhav diff --git a/.github/actions/spelling/allow/terms.txt b/.github/actions/spelling/allow/terms.txt index e034f70a..cba32c62 100644 --- a/.github/actions/spelling/allow/terms.txt +++ b/.github/actions/spelling/allow/terms.txt @@ -27,7 +27,11 @@ cppyy cytokine cytokines gitlab +gridlay gsoc +gpu +llvm +pushforward linkedin microenvironments pythonized diff --git a/_data/contributors.yml b/_data/contributors.yml index 949480e9..75ecdbf7 100644 --- a/_data/contributors.yml +++ b/_data/contributors.yml @@ -310,6 +310,28 @@ proposal: /assets/docs/de_la_torre_gonzalez_salvador_proposal_gsoc_2025.pdf mentors: Vassil Vassilev, Lukas Breitwieser +- name: Abdelrhman Elrawy + photo: Abdelrhman.jpg + info: "Google Summer of Code 2025 Contributor" + email: abdelrhman.elrawy1@gmail.com + education: "Master of Applied Computing, Wilfrid Laurier University, Canada" + github: "https://github.com/a-elrawy" + active: 1 + linkedin: "https://www.linkedin.com/in/elrawy/" + projects: + - title: "Support usage of Thrust API in Clad" + status: Ongoing + description: | + This project enhances Clad, a Clang-based automatic differentiation tool, + by enabling it to support NVIDIA's Thrust library for GPU-parallel programming. + The goal is to implement custom derivative rules for Thrust primitives like + `thrust::transform` and `thrust::reduce`, making it possible to differentiate + high-performance CUDA code automatically. This work bridges the gap between + automatic differentiation and GPU acceleration, enabling efficient gradient + computations in scientific computing and machine learning workloads. + proposal: /assets/docs/Abdelrhman_Elrawy_Proposal_GSoC_2025.pdf + mentors: Vassil Vassilev, Alexander Penev + - name: "This could be you!" photo: rock.jpg info: See openings for more info diff --git a/_pages/team/abdelrhman-elrawy.md b/_pages/team/abdelrhman-elrawy.md new file mode 100644 index 00000000..958594f8 --- /dev/null +++ b/_pages/team/abdelrhman-elrawy.md @@ -0,0 +1,10 @@ +--- +title: "Compiler Research - Team - Abdelrhman Elrawy" +layout: gridlay +excerpt: "Compiler Research: Team members" +sitemap: false +permalink: /team/AbdelrhmanElrawy +email: abdelrhman.elrawy1@gmail.com +--- + +{% include team-profile.html %} diff --git a/_posts/2025-05-18-support-usage-of-thrust-API-in-clad.md b/_posts/2025-05-18-support-usage-of-thrust-API-in-clad.md new file mode 100644 index 00000000..4ecfe292 --- /dev/null +++ b/_posts/2025-05-18-support-usage-of-thrust-API-in-clad.md @@ -0,0 +1,52 @@ +--- +title: "Supporting Thrust API in Clad" +layout: post +excerpt: "This summer, I am working on adding support for Thrust API in Clad, enabling automatic differentiation of GPU-accelerated code. This work bridges the gap between high-performance CUDA parallelism and source-to-source AD transformation." +sitemap: false +author: Abdelrhman Elrawy +permalink: blogs/gsoc25_/ +banner_image: /images/blog/gsoc-banner.png +date: 2025-05-18 +tags: gsoc llvm clang automatic-differentiation gpu cuda thrust +--- + +## About Me + +Hi! I’m Abdelrhman Elrawy, a graduate student in Applied Computing specializing in Machine Learning and Parallel Programming. I’ll be working on enabling **Thrust API support in Clad**, bringing GPU-accelerated parallel computing to the world of automatic differentiation. + +## Project Description + +[Clad](https://github.com/vgvassilev/clad) is a Clang-based tool for source-to-source automatic differentiation (AD). It enables gradient computations by transforming C++ code at compile time. + +However, many scientific and machine learning applications leverage **NVIDIA’s Thrust**, a C++ parallel algorithms library for GPUs, and currently, Clad doesn’t support differentiating through Thrust constructs. This limits the usability of Clad in high-performance CUDA code. + +My project addresses this gap by enabling Clad to: + +- Recognize and handle Thrust primitives like `thrust::transform` and `thrust::reduce` +- Implement **custom pullback/pushforward rules** for GPU kernels +- Ensure gradients maintain **parallel performance and correctness** +- Benchmark and validate derivatives in real-world ML and HPC use cases + +## Technical Approach + +The project begins with a **proof-of-concept**: manually writing derivatives for common Thrust operations like `transform` and `reduce`. These are compared against finite differences to validate correctness. + +Following that, I’ll integrate custom differentiation logic inside Clad, building: +- A `ThrustBuiltins.h` header for recognizing Thrust calls +- Visitor pattern extensions in Clad’s AST traversal (e.g., `VisitCallExpr`) +- GPU-compatible derivative utilities (e.g., CUDA-aware `thrust::fill`, `transform`) + +I'll also implement **unit tests**, real-world **mini-apps** (e.g., neural networks), and **benchmarks** to validate and demonstrate this feature. + +## Expected Outcomes + +By the end of GSoC 2025, Clad will be able to: +- Differentiate through key Thrust primitives with GPU execution preserved +- Provide documentation and tutorials for GPU-based automatic differentiation +- Contribute a robust test suite and benchmarks to the Clad ecosystem + +## Related Links + +- [Clad GitHub](https://github.com/vgvassilev/clad) +- [Project description](https://hepsoftwarefoundation.org/gsoc/2025/proposal_Clad-ThrustAPI.html) +- [My GitHub](https://github.com/a-elrawy) diff --git a/assets/docs/Abdelrhman_Elrawy_Proposal_GSoC_2025.pdf b/assets/docs/Abdelrhman_Elrawy_Proposal_GSoC_2025.pdf new file mode 100644 index 00000000..f51ed04f Binary files /dev/null and b/assets/docs/Abdelrhman_Elrawy_Proposal_GSoC_2025.pdf differ diff --git a/images/team/Abdelrhman.jpg b/images/team/Abdelrhman.jpg new file mode 100644 index 00000000..7b2565ee Binary files /dev/null and b/images/team/Abdelrhman.jpg differ