<div dir="auto"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto">Thanks for the RFC. I think I've caught up on the thread and associated patches. I'm late to the party so this email is a bit long.</div><div dir="auto"><br></div><div dir="auto">Today we have a working nvptx implementation in tree. There's also a working implementation for amdgcn on githib. @Ravi if yours is open source I'd love to compare the implementations, if not, I'd invite you to look at </div><div dir="auto"><a href="https://github.com/ROCm-Developer-Tools/llvm-project/tree/AOMP-190715/openmp/libomptarget/deviceRTLs">https://github.com/ROCm-Developer-Tools/llvm-project/tree/AOMP-190715/openmp/libomptarget/deviceRTLs</a><br></div><div dir="auto"><br></div><div dir="auto">Largely shared code would make bringing up new devices easier if the abstractions are in the right place and otherwise more difficult. I'm wary of significantly rewriting the code while only a single target is supported in case we draw the lines in the wrong place. To that end, we (amd) would like to add our target. That'll remove some hard coded nvptx behaviour and hopefully reduce the cost of adding a third accelerator.</div><div dir="auto"><br></div><div dir="auto">Right now, there's zero code shared with nvptx. We copied the cuda and #ifdef'ed the parts that differ. That's too expensive to maintain under churn to 'common' code and not something I'd like to commit as is. Instead, I'd like to incrementally refactor the deviceRTL to extract nvptx specific stuff, with close reference to our GitHub repo, until the difference is so slight that we can upstream a couple of files and some cmake to bring amdgcn online.</div><div dir="auto"><br></div><div dir="auto">Reducing the use of cuda, bringing the code more inline with LLVM's coding style, documenting target bring up are all great goals. I think that can also be done incrementally and is largely orthogonal to getting some target diversity in the codebase. I'd like to be involved in both tracks.</div><div dir="auto"><br></div><div dir="auto">As a concrete, minimal proposal, I'd like to put the functions that use nvptx asm behind a zero runtime overhead interface and get that up for review.</div><div dir="auto"><br></div><div dir="auto">Thanks all,</div><div dir="auto"><br></div><div dir="auto">Jon</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---------<br></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Message: 1<br>
Date: Thu, 11 Jul 2019 19:09:19 +0000<br>
From: "Doerfert, Johannes via Openmp-dev" <<a href="mailto:openmp-dev@lists.llvm.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">openmp-dev@lists.llvm.org</a>><br>
To: "Narayanaswamy, Ravi" <<a href="mailto:ravi.narayanaswamy@intel.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">ravi.narayanaswamy@intel.com</a>>, "Bae,<br>
        Hansang" <<a href="mailto:hansang.bae@intel.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">hansang.bae@intel.com</a>>, "Tian, Xinmin"<br>
        <<a href="mailto:xinmin.tian@intel.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">xinmin.tian@intel.com</a>><br>
Cc: "<a href="mailto:openmp-dev@lists.llvm.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">openmp-dev@lists.llvm.org</a>" <<a href="mailto:openmp-dev@lists.llvm.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">openmp-dev@lists.llvm.org</a>><br>
Subject: Re: [Openmp-dev] [RFC] Device runtime library (re)design<br>
Message-ID:<br>
        <<a href="mailto:DM6PR09MB39622938E09D6E11080F6838BAF30@DM6PR09MB3962.namprd09.prod.outlook.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">DM6PR09MB39622938E09D6E11080F6838BAF30@DM6PR09MB3962.namprd09.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Yes, the RFC I send to openmp-dev has three example patches that clean up the code, add documentation, and extract target specific 16<br>
******************************************<br>
</blockquote></div></div></div>