<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/CAPI/ExecutionEngine, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR] Split ExecutionEngine Initialization out of ctor into an explicit method call (#153524)</title>
<updated>2025-08-17T21:07:24+00:00</updated>
<author>
<name>Shenghang Tsai</name>
<email>jackalcooper@gmail.com</email>
</author>
<published>2025-08-17T21:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7610b1372955da55e3dc4e2eb1440f0304a56ac8'/>
<id>7610b1372955da55e3dc4e2eb1440f0304a56ac8</id>
<content type='text'>
Retry landing https://github.com/llvm/llvm-project/pull/153373
## Major changes from previous attempt
- remove the test in CAPI because no existing tests in CAPI deal with
sanitizer exemptions
- update `mlir/docs/Dialects/GPU.md` to reflect the new behavior: load
GPU binary in global ctors, instead of loading them at call site.
- skip the test on Aarch64 since we have an issue with initialization there

---------

Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Retry landing https://github.com/llvm/llvm-project/pull/153373
## Major changes from previous attempt
- remove the test in CAPI because no existing tests in CAPI deal with
sanitizer exemptions
- update `mlir/docs/Dialects/GPU.md` to reflect the new behavior: load
GPU binary in global ctors, instead of loading them at call site.
- skip the test on Aarch64 since we have an issue with initialization there

---------

Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[MLIR] Split ExecutionEngine Initialization out of ctor into an explicit method call" (#153477)</title>
<updated>2025-08-13T19:43:04+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-13T19:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bfd490e0cda0917dfc357ca87f3c0639ba38a56f'/>
<id>bfd490e0cda0917dfc357ca87f3c0639ba38a56f</id>
<content type='text'>
Reverts llvm/llvm-project#153373

Sanitizer bot is broken</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#153373

Sanitizer bot is broken</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Split ExecutionEngine Initialization out of ctor into an explicit method call (#153373)</title>
<updated>2025-08-13T13:22:01+00:00</updated>
<author>
<name>Shenghang Tsai</name>
<email>jackalcooper@gmail.com</email>
</author>
<published>2025-08-13T13:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f93693f76fab9841810ef988087c95887728a91'/>
<id>2f93693f76fab9841810ef988087c95887728a91</id>
<content type='text'>
This PR introduces a mechanism to defer JIT engine initialization,
enabling registration of required symbols before global constructor
execution.

## Problem

Modules containing `gpu.module` generate global constructors (e.g.,
kernel load/unload) that execute *during* engine creation. This can
force premature symbol resolution, causing failures when:
- Symbols are registered via `mlirExecutionEngineRegisterSymbol` *after*
creation
- Global constructors exist (even if not directly using unresolved
symbols, e.g., an external function declaration)
   - GPU modules introduce mandatory binary loading logic

## Usage
```c
// Create engine without initialization
MlirExecutionEngine jit = mlirExecutionEngineCreate(...);

// Register required symbols
mlirExecutionEngineRegisterSymbol(jit, ...);

// Explicitly initialize (runs global constructors)
mlirExecutionEngineInitialize(jit);
```

---------

Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR introduces a mechanism to defer JIT engine initialization,
enabling registration of required symbols before global constructor
execution.

## Problem

Modules containing `gpu.module` generate global constructors (e.g.,
kernel load/unload) that execute *during* engine creation. This can
force premature symbol resolution, causing failures when:
- Symbols are registered via `mlirExecutionEngineRegisterSymbol` *after*
creation
- Global constructors exist (even if not directly using unresolved
symbols, e.g., an external function declaration)
   - GPU modules introduce mandatory binary loading logic

## Usage
```c
// Create engine without initialization
MlirExecutionEngine jit = mlirExecutionEngineCreate(...);

// Register required symbols
mlirExecutionEngineRegisterSymbol(jit, ...);

// Explicitly initialize (runs global constructors)
mlirExecutionEngineInitialize(jit);
```

---------

Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Fix mlirExecutionEngineLookup throwing assert on lookup fail (#123924)</title>
<updated>2025-02-15T11:21:20+00:00</updated>
<author>
<name>Edgar</name>
<email>git@edgarluque.com</email>
</author>
<published>2025-02-15T11:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2db262886f0c06c079e1b2808c4c14c16f8861b5'/>
<id>2db262886f0c06c079e1b2808c4c14c16f8861b5</id>
<content type='text'>
Apparently trying to lookup a function pointer using the C api
`mlirExecutionEngineLookup` will throw an assert instead of just
returning a nullptr on builds with asserts.

The docs itself says it returns a nullptr when no function is found so
it should be sensible to not throw an assert in this case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently trying to lookup a function pointer using the C api
`mlirExecutionEngineLookup` will throw an assert instead of just
returning a nullptr on builds with asserts.

The docs itself says it returns a nullptr when no function is found so
it should be sensible to not throw an assert in this case.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[mlir] Link libraries that aren't included in libMLIR to libMLIR" (#123910)</title>
<updated>2025-01-22T09:01:50+00:00</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2025-01-22T09:01:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=047e8e47c1f9d872aec835b915935802e195c555'/>
<id>047e8e47c1f9d872aec835b915935802e195c555</id>
<content type='text'>
Use `mlir_target_link_libraries()` to link dependencies of libraries
that are not included in libMLIR, to ensure that they link to the dylib
when they are used in Flang. Otherwise, they implicitly pull in all
their static dependencies, effectively causing Flang binaries to
simultaneously link to the dylib and to static libraries, which is never
a good idea.

I have only covered the libraries that are used by Flang. If you wish, I
can extend this approach to all non-libMLIR libraries in MLIR, making
MLIR itself also link to the dylib consistently.

[v3 with more `-DBUILD_SHARED_LIBS=ON` fixes]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `mlir_target_link_libraries()` to link dependencies of libraries
that are not included in libMLIR, to ensure that they link to the dylib
when they are used in Flang. Otherwise, they implicitly pull in all
their static dependencies, effectively causing Flang binaries to
simultaneously link to the dylib and to static libraries, which is never
a good idea.

I have only covered the libraries that are used by Flang. If you wish, I
can extend this approach to all non-libMLIR libraries in MLIR, making
MLIR itself also link to the dylib consistently.

[v3 with more `-DBUILD_SHARED_LIBS=ON` fixes]</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] Link libraries that aren't included in libMLIR to libMLIR (#123781)"</title>
<updated>2025-01-22T08:09:52+00:00</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2025-01-22T08:08:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9decc24c6ba5398f7cb1b2a0c26bd36e2da479f8'/>
<id>9decc24c6ba5398f7cb1b2a0c26bd36e2da479f8</id>
<content type='text'>
This reverts commit 4c6242ebf50dde0597df2bace49d534b61122496.  More
BUILD_SHARED_LIBS=ON regressions, sigh.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4c6242ebf50dde0597df2bace49d534b61122496.  More
BUILD_SHARED_LIBS=ON regressions, sigh.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Link libraries that aren't included in libMLIR to libMLIR (#123781)</title>
<updated>2025-01-22T07:54:54+00:00</updated>
<author>
<name>Michał Górny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2025-01-22T07:54:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4c6242ebf50dde0597df2bace49d534b61122496'/>
<id>4c6242ebf50dde0597df2bace49d534b61122496</id>
<content type='text'>
Use `mlir_target_link_libraries()` to link dependencies of libraries
that are not included in libMLIR, to ensure that they link to the dylib
when they are used in Flang. Otherwise, they implicitly pull in all
their static dependencies, effectively causing Flang binaries to
simultaneously link to the dylib and to static libraries, which is never
a good idea.

I have only covered the libraries that are used by Flang. If you wish, I
can extend this approach to all non-libMLIR libraries in MLIR, making
MLIR itself also link to the dylib consistently.

[v2 with fixed `-DBUILD_SHARED_LIBS=ON` build]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `mlir_target_link_libraries()` to link dependencies of libraries
that are not included in libMLIR, to ensure that they link to the dylib
when they are used in Flang. Otherwise, they implicitly pull in all
their static dependencies, effectively causing Flang binaries to
simultaneously link to the dylib and to static libraries, which is never
a good idea.

I have only covered the libraries that are used by Flang. If you wish, I
can extend this approach to all non-libMLIR libraries in MLIR, making
MLIR itself also link to the dylib consistently.

[v2 with fixed `-DBUILD_SHARED_LIBS=ON` build]</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)</title>
<updated>2023-09-14T21:10:14+00:00</updated>
<author>
<name>Arthur Eubanks</name>
<email>aeubanks@google.com</email>
</author>
<published>2023-09-14T21:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a1aa6cda2758b0926a95f87d39ffefb1cb90200'/>
<id>0a1aa6cda2758b0926a95f87d39ffefb1cb90200</id>
<content type='text'>
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.

This matches other nearby enums.

For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.

This matches other nearby enums.

For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::</pre>
</div>
</content>
</entry>
<entry>
<title>Activate OpenMP translation in MLIR execution engine CAPI.</title>
<updated>2023-06-05T18:56:50+00:00</updated>
<author>
<name>Rafael Ubal Tena</name>
<email>rubal@mathworks.com</email>
</author>
<published>2023-06-05T18:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db7cc0348c9a0aa44b23948949afef488d5083dd'/>
<id>db7cc0348c9a0aa44b23948949afef488d5083dd</id>
<content type='text'>
We've observed that the MLIR Jit Engine fails when the `omp` dialect is used due to a failure to register OpenMP-related translations. This small patch addresses this issue.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D151577
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've observed that the MLIR Jit Engine fails when the `omp` dialect is used due to a failure to register OpenMP-related translations. This small patch addresses this issue.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D151577
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Update JitRunner, ExecutionEngine after LLVM commit 8b1771bd9f3.</title>
<updated>2023-03-28T02:18:04+00:00</updated>
<author>
<name>Lang Hames</name>
<email>lhames@gmail.com</email>
</author>
<published>2023-03-28T02:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=557a0ea8aff31de1cc337bd3819f015338f7d553'/>
<id>557a0ea8aff31de1cc337bd3819f015338f7d553</id>
<content type='text'>
LLVM commit 8b1771bd9f3 replaced JITEvaluatedSymbol with ExecutorSymbolDef.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM commit 8b1771bd9f3 replaced JITEvaluatedSymbol with ExecutorSymbolDef.
</pre>
</div>
</content>
</entry>
</feed>
