[llvm-dev] RFC: Enzyme, Automatic Differentiation for LLVM as an LLVM Incubator Project

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 09:53:54 PST 2021


Hi William,

I think this is a really cool project and worthy of being in LLVM. For now
it's a plugin pass, which goes well with incubator projects, but it could
very well be a standard IR pass that is enabled by flags, etc. We have
similar examples for OpenCL, OpenMP, etc. which need integration on both
Clang and LLVM. Shouldn't be too messy.

On Tue, 12 Jan 2021 at 22:14, William Moses via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Obviously integration into the monorepo itself would fix this for
> subsequent versions so it's somewhat of a chicken-and-the egg issue. I'd
> love to hear any thoughts from folks on how something like this might be
> eventually handled. I'd also like to see upstream users (for example to
> differentiate MLIR -- ideally with nice integration for reductions, see
> comment below regarding parallelism).
>

I think long term you should split support for older versions with the
trunk version. Once (and if) it gets merged into the monorepo, we can keep
the incubation repo with the previous versions only, and only to official
versions, mostly static and for historical value. People should be
encouraged to use the newer versions that have native support.

Differentiating MLIR would probably be a separate infrastructure, not sure
using the same libraries? I haven't dug too much, but I expect some of the
analysis to be tailored to LLVM's operations and types, which have fixed
semantics and are very different from MLIR, with custom dialects,
operations and types. But it would be really nice if we had that at the
MLIR level, at least for the standard upstream dialects, as it would be a
major boost for ML compilers to start using MLIR more aggressively.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210115/f1d58f65/attachment.html>


More information about the llvm-dev mailing list