Skip to content

Instantly share code, notes, and snippets.

View fabianmcg's full-sized avatar

Fabian Mora fabianmcg

View GitHub Profile
@fabianmcg
fabianmcg / .md
Created April 25, 2023 15:35
[RFC] Extending MLIR GPU device codegen pipeline

Summary

The current pipeline for generating GPU code has some drawbacks, like not being able to link to bytecode libraries like libdevice, or device linking in general, requiring building MLIR on the target system for obtaining executable code, to name a few.

This proposal would introduce an alternative pipeline for generating device code. Essentially it would generate clang compliant offload LLVM IR and the task for generating the final executable would be left to clang, removing the burden away from MLIR and leveraging clang's capabilities for offload code generation.

Important notice, this won't introduce a clang build dependency to MLIR.

Context & Motivation