[RFC] `llvm-project/offload` roadmap

I still object.

As stated previously, I believe we have enthusiastic support for a LLVM GPU offloading library that is used by multiple different languages, in and out of tree. We are all tired of targeting multiple different vendor libraries and would like a common abstraction. We have an opening to do something really useful here.

Your plan of record is mv libomptarget LLVMGPU then comprehensively rewrite. I do not see support for that from any group other than openmp developers, and even those developers have mixed feelings about the rewrite part. People want their pain point addressed, it does not follow that they want you to do this.

Instead of your plan, I maintain that we should create a LLVMGPU project, write an API for it which has features like “find a kernel” and “launch a kernel” which aren’t interwoven with openmp semantics. We then use that library as part of the implementation of openmp and other users. That follows the collection of reusable libraries strategy of LLVM which I believe does and should have widespread support.

I have concerns about your plan to move libomptarget and then immediately rewrite it. Given that’s the intent, you should write your new library instead and optionally use it from libomptarget. That drastically reduces the risk of breaking users of libomptarget and has zero effect on your stated development plan. It also leaves you free to write a more useful language agnostic interface, free of the existing API. That is the technically superior strategy to achieve your stated goals and I am totally bewildered that you are unwilling to consider it.

I also have concerns that you have been unwilling to engage with AMD engineers about this strategy, given that the ROCm compiler is the only downstream compiler that uses libomptarget (based on attendance in the multicompany openmp meeting). Intel and HPE both use their own library and are thus unaffected by this change, except for where you subsequently break the API as planned above. I am arguing internally that AMD should likewise abandon your library in favour of a hard fork of the runtime libraries until such time as the new GPU offloading library becomes equivalently usable to the one currently in tree.

You consider my suggestion to take too long relative to hacking things together. That fundamentally misunderstands that the purpose of a common library. The goal should be to reduce the implementation cost of GPU languages, not minimise the implementation cost of the common library. A library called “LLVM GPU” which contains all the bugs and quirks of OpenMP is not going to decrease the implementation cost for anyone.