Skip to content

Conversation

@adam-smnk
Copy link
Contributor

@adam-smnk adam-smnk commented Nov 10, 2025

Improves handling around the list of shared libraries paths to avoid execution engine errors caused by path resolution.
Extra shared libraries can now be provided using --shared-libs script flag instead of environment variable.

Example's documentation wording is also improved as the example kernel does not actively require any runtime utilities.
However, the section is kept to showcase an example library setup as external runtime utilities are often needed for more complex kernels.

Improves handiling around the list of shared libraries paths to avoid
execution engine errors caused by path resolution.

Example's documentation wording is also improved as the example kernel
does not actively require any runtime utilities.
However, the section is kept to showcase an example library setup as
external runtime utilities are often needed for more complex kernels.
@banach-space
Copy link

I know that this is just updating the existing design, but I'd rather we didn't define env variables and then parse them in Python. Why not use proper input variables that are self-documenting (via -help)? WDYT?

@adam-smnk
Copy link
Contributor Author

Why not use proper input variables that are self-documenting (via -help)?

In this case, input var would be a fine alternative. This example aims to be a self-contained example and no runtime is strictly needed to run current trivial example.

I'd rather we didn't define env variables and then parse them in Python.

Long-term, I'd aim for a simple unified configuration for the lighthouse.
We'll need some flexible way to setup and control runtime characteristics of various platforms.
Personally, I'd want to avoid the verbosity and boilerplate nature of existing CLI tools like mlir-runner.

The env var here is a simple initial stab at that - assuming later refactoring, moving into some settings submodule etc.
Now, there must be better patterns or tools to achieve that in a Python project without creating N more control flags.
Always open to more suggestion. 🙂

@rengolin
Copy link
Member

I just uploaded a draft diagram of what I think we should be aiming at (https://github.com/llvm/lighthouse/wiki/Integrator).

This script is a dirty hack to show people "what we mean" and should not be over engineered. Between env and args, if we keep the arg to just this one thing, then it should be fine (better than env). But I'd avoid creating APIs for this side script.

Copy link

@banach-space banach-space left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@rolfmorel rolfmorel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@adam-smnk adam-smnk merged commit ba8aa78 into llvm:main Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants