From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 5C90A3858D32 for ; Sat, 30 Mar 2024 20:48:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C90A3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C90A3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711831741; cv=none; b=aeLU9nJjththZhuNOltQD8ov9Wy7wJp//a3cqoOn7kGJL9a7lVjqaLN0n0iBtsDAQEluBcmQqxUI8GbqWWp75nZ4OAJIYmb0H/5HWL0RBrDGOzBLCSVxWJKk8EQCACdaV60+vvxEQnxDzydqNjLvqCCpIQXCq/XkYWYmxfoQLoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711831741; c=relaxed/simple; bh=rEuAc4Vmsl9VSls/vSQtwv7ZlUpT4S4GM62MuMs7jy0=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=YOCz7jO5dhRxbMDxKoUG5EJrKzY/arSGFTya9cjL5q5ObkcvkaQ8c5582e0hnD5yP2afUayA4xHq8fPLue21dalPU5R2+4VXkkm5ZZJWslzAYL7SJMowXNY1CCbaB8P/7rLTM5TVSljHesK5SOi8o1uQaErlZVd7c8kCO5daHRo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4D6155CB1A; Sat, 30 Mar 2024 20:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1711831738; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5Yt6Sl/QjmNKRsVhKfFqWHtt5uNRp9RyF6NiDOHVwXA=; b=wV2pYpEi+XiRqrERIMT6MN8EbZ9YlaznxA9F1o3EVK+nFjuNJDeEkiW3EtOG7ZRke6idKb MKPTQHAiOhJ/q6pHT8rHaYdr8vh6hgZkicuZ+guazKrlSnICkuYBkVy4Ffrvo0UgN5L23+ DnrLQZT+F35s0tm3b6L9vGwcan2Zfig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1711831738; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5Yt6Sl/QjmNKRsVhKfFqWHtt5uNRp9RyF6NiDOHVwXA=; b=7ZP6SQ9yhPoXg6gDbtF3KF9oSCHiDwIso0ib/tZBTrW4iPDcWP8JY4JTaeLoR40XuAmOrS OA9s4L1RI2pog5DA== Authentication-Results: smtp-out2.suse.de; none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 4430813A90; Sat, 30 Mar 2024 20:48:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id eYE7ELp6CGa9KQAAn2gu4w (envelope-from ); Sat, 30 Mar 2024 20:48:58 +0000 From: Martin Jambor To: Soumya Ranjan , gcc@gcc.gnu.org, tschwinge@baylibre.com Subject: Re: Initial draft of GSOC proposal - Offloading to a separate process on the same host. In-Reply-To: References: User-Agent: Notmuch/0.38.2 (https://notmuchmail.org) Emacs/29.3 (x86_64-suse-linux-gnu) Date: Sat, 30 Mar 2024 21:48:53 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap2.dmz-prg2.suse.org:rdns,imap2.dmz-prg2.suse.org:helo] X-Spam-Score: -3.30 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,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: Hello, On Wed, Mar 27 2024, Soumya Ranjan wrote: > 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. > This sounds great. First, please note that timing of the GSoC contributor application deadline (on the upcoming Tuesday) is a bit unfortunate because of Easter, many involved mentors have a long weekend (public holiday on Friday or Monday or, like me, both). So please even if you do not receive any feedback, make sure to apply - and don't leave it until the last day. IIUC a proposal can be always updated later. I'll have to admit that I read your proposal only quickly and it makes sense. I'd just like to point out that the VGPU part is really a second (though perhaps much larger and interesting) part of the project, the first part would be to simulate a CPU-like accelerator with a separate memory. But most of this work would be necessary for VGPU part too. What is more, the VGPU part is likely to be hard, so if your time constraints allow it and doing both is your goal, I'd suggest to apply for an 350-hour (large) project. I'll see if I can cough out any more feedback in time but as I wrote above, generally it is good and don't wait - t least not with the initial application. Good luck! Martin > 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