From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 2280F3858C98 for ; Thu, 28 Mar 2024 02:41:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2280F3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=uci.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=uci.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2280F3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711593672; cv=none; b=ks7tjk+cnMMjQkAY8oUY5eSpXXqXCoBKvWh30ayV5d4DLlBLsCHyolsUqJMGJd0AryoHg8AWwZTssaYr3py8TLAB22SUL2xng7mt+2ropIlZ8ans6uXU7zhBkGIVFchEgqYIyEHvCrmiQqF59bmSH3zjg3pEfwY6oVU2tUvWmPM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711593672; c=relaxed/simple; bh=eDGiNz+HAHMA6GYcPXnH+LAjVOk015QgDE/TrUlvRNE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=VvICxC5UgSpGTchuWhwDt1lSLEU/tbTkxbZm3WRzlgjAmHRncW55YluKDpRcg4RSHy2CLeNEGC2ednE4DU+WAzykINTu6zjPrg/Tac4F1RcjZNHqVmwptcs3q0mgIr8bQccnn8EMhUNSiWdaQeW7n2OMyQNV0pQ/MjOwLz+LyNs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e0ae065d24so4438565ad.1 for ; Wed, 27 Mar 2024 19:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uci.edu; s=google; t=1711593669; x=1712198469; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=eDGiNz+HAHMA6GYcPXnH+LAjVOk015QgDE/TrUlvRNE=; b=gvX5QGCnj2+Mh48U0D4Fz1HSN74MDnzBFoiooNQ0DHQQHcOe/uaS0C7IRk+C4JWtcp 3aEoMnflqU/ufuwLy7Y6e59Y2SUgwT9eU+HHLPHrkScoqFCcWU14/VeaneheznURdNlz /x84mX9AEKoBYX8CultflBgjBYnO43sI0bUmEp9Mm9F1j+VpmAyYEXmcw1OVpc8j2Co3 A3ZQDQdNrWCirSow0OQPRRS12LZDQDwrn3PYtkTjv+BRBH8YCKqnDm//XhgV9nPn+94J GoszlmVBcZk3LHjB4TezfkK6ojdVNuk1uhXlzrrs0zpFCVsBzU6KDxv+ZqorEX3uQKuq gT8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711593669; x=1712198469; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eDGiNz+HAHMA6GYcPXnH+LAjVOk015QgDE/TrUlvRNE=; b=t4PILWX5zJi9vx0dMmQnwL/vUbXsiueNi2tQnVn6jV1ZnsMlmTtx51usyQaKLJ58QZ 5dRg+GQoemutlMp2fjw1shLY63BpIqUi1IMAKDqxjn7HpnZXhdaglohMgxMQEI3IFgAo uUC4+TqPzAbysEOag8cerNO+j3b3q5kNNh5Yw/fcKm4YO4V7tfct06ud+xnhhTDhH+wX hB20A7bqDMjVDXz8Ep5EHIYkiH8BSvwmPqQInZocbo2zQAIvT6PVPnWdQer+WJRzwvIJ RAx8Q/k1moNZloW2ZLwdLvxeMzcA5edgD/Bww8rpIDvTAADa8FP/+NN4KxG6eeJXf3uP 43EQ== X-Gm-Message-State: AOJu0YxuWVMrmcZfzR2ZYvtC8gjYrTyuYWmelra7EmNs7x6w3LBaieRY hL6Z7978z0GGs7ZKYmfRQLQxmpqs+VKSbgMeqTmETLW6L6iJVAwjgMT1qik9nPK3ee7WHyXRr59 VUAPg8k9G6UmMyq5RVdrYdjvdCHjoVN1iHSaFKfDl8db7ugI4D/c= X-Google-Smtp-Source: AGHT+IFmT/06e7g7qAwlpebApIUujzbZSez3oOkvWuP3NLd1oRgAdoiNppCl6ZCY8hXRdkHmJLLYAigJili6HOpLKtE= X-Received: by 2002:a17:902:7688:b0:1e0:a1c7:571c with SMTP id m8-20020a170902768800b001e0a1c7571cmr1498001pll.26.1711593668737; Wed, 27 Mar 2024 19:41:08 -0700 (PDT) MIME-Version: 1.0 From: Soumya Ranjan Date: Wed, 27 Mar 2024 19:40:57 -0700 Message-ID: Subject: Initial draft of GSOC proposal - Offloading to a separate process on the same host. To: gcc@gcc.gnu.org, mjambor@suse.cz, tschwinge@baylibre.com Content-Type: multipart/alternative; boundary="000000000000a016b70614af743e" X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000a016b70614af743e Content-Type: text/plain; charset="UTF-8" Hello! Thanks for your response Martin! Sorry for the late response, I've been researching the project, going over the source code and preparing the proposal. After a lot of thought, I've decided to go with the "Offloading to a separate process on the same host" project, mostly because I feel like I've reasonable background on this project, as I've worked on OpenMP, GPU Programming and have done coursework on compilers and operating systems. Yes, I am no longer a student. I recently graduated from the University of California, Irvine with a master's degree in Computer Engineering (About 3 months back) and I've recently joined Qualcomm as a firmware engineer. I realized that I have a lot of free time, that I mostly spend playing video games, and I've always wanted to get into open source development, so I thought this would be a good opportunity, given how much I use gcc for everything. Why specifically this project - OpenMP's support for offloading to physical GPUs broadens the horizon for high-performance computing applications, the complexity of setting up such environments and the lack of adequate tooling for development and debugging can hinder productivity. The VGPU project directly addresses these challenges by providing a developer-friendly offloading target that emulates GPU execution on the host CPU, bridging the existing tooling gap and significantly enhancing developer productivity in the realm of parallel computing. Anyway, getting into the details of the project, from my understanding, the goals are - 1) To implement a virtual GPU (VGPU) environment that mirrors physical GPU architecture including support for different levels of parallelism (warp, thread block, etc.). 2) To enable the VGPU to serve as an offload target within the LLVM/OpenMP framework. This includes adding a host-ISA offloaded code generation mode that allows the compilation of OpenMP applications using GPU-specific paths and runtimes, facilitating a more accurate emulation of GPU environments. 3) To implement a plugin for libgomp that communicates with the libgomp offloading machinery to manage the execution of offloaded code in a new process, simulating the behavior of actual GPU devices. 4) To optimize the VGPU to ensure that OpenMP applications executed on it incur minimal performance overhead compared to native host execution, thereby making it a viable option for development and testing purposes. Here's a rough timeline (Based on the timeline on the gsoc website) - Pre-coding (Until May 27) - 1) Setting up a development environment including LLVM/OpenMP and necessary debugging tools. 2) Conducting thorough literature review on existing GPU simulation techniques and OpenMP offloading mechanisms. Week 1-3: Initial Infrastructure 1) Design VGPU architecture (simulate gpu parallel execution models (warps, blocks) and memory hierarchy (global, shared, private)) 2) Implement the core vgpu infrastructure, like basic memory management. Week 4-6: Integration with LLVM/OpenMP and Host-ISA Offload Mode 1) Develop LLVM IR generation for VGPU target, thereby ensuring openMP directives can be compiled into vgpu-compatible code. 2) Add a new mode in the LLVM/OpenMP framework for generating offloaded code specifically for the VGPU target. 3) Get simple openMP applications to compile and execute on the VGPU. By Midterm evaluation, hopefully should have basic openmp applications offloaded on the VGPU. Week 7-9: Extending functionality and Implementing libgomp Plugin 1) Extend VGPU to support more functionality like loops, sections, parallel blocks. 2) Implement a plug-in for libgomp that interfaces with its offloading machinery. 3) Maybe look to integrate with debugging tools, so users can step through offloaded regions and profile code. Week 10-12: Evaluation and Final Submission 1) Benchmark against physical GPU's to evaluate the VGPU's performance. 2) Prepare a final project report documenting the development process, challenges, results and future work. I know this is a pretty high-level description, but I will try my best to stick to this. This submission is mainly to go over the content. I would appreciate any feedback I can get, and will make sure to submit a more detailed description on my final submission. Awaiting your feedback. Thanks, Soumya Ranjan --000000000000a016b70614af743e--