About Eudsl
Eudsl is an MCP server published by llvm in the IoT category: embedded Universal DSL: a good DSL for us, by us. Conduid read 29 tools from its source: chain_pipeline, clone_module, create_func, delete_session, erase_op, execute_python and 23 more. No package is published for it, so it installs from a source checkout.
The repository has 88 stars and 23 forks, and its last commit was on 2 Dec 2026. Conduid has no tagged release on record for it. Its topics include iot.
Install
git clone https://github.com/llvm/eudslTools (29)
chain_pipelineApply additional passes to the current IR state (incremental lowering). Must have active IR from run_pipeline first.| Parameter | Type | Description |
|---|---|---|
| pipeline * | string | Pass pipeline string |
| session | string |
clone_moduleDeep-copy a module for safe experimentation.| Parameter | Type | Description |
|---|---|---|
| dest_var | string | Destination variable name |
| session | string | |
| src_var | string | Source module variable |
create_funcCreate a func.FuncOp with the given name and type signature, add an entry block, and store it in the session. Uses the generated func.FuncOp builder.| Parameter | Type | Description |
|---|---|---|
| input_types * | array | Input type strings (e.g. ['i32', 'f32']). Uses Type.parse for convenience. |
| module_var | string | Module to insert into (must exist in session) |
| name * | string | Function name |
| result_types * | array | Result type strings (e.g. ['i64']). Uses Type.parse for convenience. |
| session | string | |
| var_name | string | Variable to store the FuncOp |
delete_sessionDestroy a named session. Cannot delete 'default'.| Parameter | Type | Description |
|---|---|---|
| name * | string | Session to delete |
erase_opDetach and erase an operation from its parent.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| var_name * | string | Variable holding the operation to erase |
execute_pythonExecute arbitrary Python code in a persistent MLIR session. The namespace is pre-loaded with: ir (mlir.ir), dialects (mlir.dialects), passmanager (mlir.passmanager), rewrite (mlir.rewrite), execution_engine (mlir.execution_engine), ctx (the session's ir.Context), Pipeline (pass pipeline builder), and helper functions (new_module, run_pipeline, find_ops, find_ops_by_name, print_op_tree, get_module_asm, list_op_names). Access types via ir.IntegerType, ir.F32Type, ir.RankedTensorType, etc. Dialect submodules are not pre-imported, so import the ones you need first, e.g. 'from mlir.dialects import arith, func, scf, linalg'. Until that import runs, attribute access such as dialects.arith raises AttributeError. Pipeline is a fluent pass pipeline builder with methods for every registered MLIR pass (e.g. Pipeline().canonicalize().cse().convert_func_to_llvm()). Use run_pipeline(module, Pipeline().<passes>) to apply. Discovery: use help(<class>) for docs/signatures (e.g. help(arith.AddIOp), help(Pipeline.canonicalize), help(ir.IntegerType)), dir(arith) to list available ops, and dir(Pipeline) to list all passes. Variables persist between calls. Use generated builders for types/attrs/ops (e.g. ir.IntegerType.get_signless(32), arith.AddIOp(lhs, rhs)). Note: PascalCase op classes (arith.AddIOp) return OpView objects — use .result to get the Value. snake_case helpers (arith.addi) return Values directly. Type.parse/Attribute.parse are only for unregistered dialects.| Parameter | Type | Description |
|---|---|---|
| code * | string | Python code to execute |
| reset | boolean | Reset user variables before executing |
| session | string | Session name |
get_current_irReturn the current IR text from the pipeline workflow.| Parameter | Type | Description |
|---|---|---|
| session | string |
get_module_asmGet the MLIR assembly text of a named module/operation variable.| Parameter | Type | Description |
|---|---|---|
| debug_info | boolean | Include debug location info |
| session | string | |
| var_name | string |
get_op_infoGet detailed info about a specific operation variable: name, attributes, operand types, result types, region count.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| var_name * | string | Variable name holding the operation |
historyShow the transformation history with optional diffs.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| show_diff | boolean | Show unified diff between consecutive states |
| show_ir | boolean | Include full IR text in each entry |
inspect_opPrint a hierarchical tree of operations (op names and block args).| Parameter | Type | Description |
|---|---|---|
| session | string | |
| var_name * | string | Variable to inspect |
list_dialectsList all available dialect modules in mlir.dialects. Use execute_python with help(<dialect>.<OpName>) to get full docs for any op.| Parameter | Type | Description |
|---|---|---|
| filter | string | Substring to filter dialect names |
list_ir_apisList all public classes and functions in mlir.ir (Context, Module, Operation, Type, etc.). Use execute_python with help(ir.<ClassName>) for full docs and method signatures.| Parameter | Type | Description |
|---|---|---|
| filter | string | Substring to filter names |
list_opsList all operation classes in a given dialect module (e.g. 'arith', 'func', 'linalg'). Use execute_python with help(<dialect>.<OpName>) for full docs, signature, and examples.| Parameter | Type | Description |
|---|---|---|
| dialect * | string | Dialect name (e.g. 'arith', 'func', 'scf', 'linalg') |
| filter | string | Substring to filter op names |
list_passesList available MLIR passes with descriptions. Optionally filter by substring. Each pass corresponds to a Pipeline() method (e.g. Pipeline().canonicalize()). Use execute_python with help(Pipeline.<name>) for full docs on a specific pass.| Parameter | Type | Description |
|---|---|---|
| filter | string | Substring to filter pass names or descriptions |
list_rewrite_apisList all public classes and functions in mlir.rewrite (PatternRewriter, TypeConverter, etc.). Use execute_python with help(rewrite.<ClassName>) for full docs and method signatures.| Parameter | Type | Description |
|---|---|---|
| filter | string | Substring to filter names |
list_sessionsList all active MLIR sessions.list_variablesList user-defined variables in a session namespace.| Parameter | Type | Description |
|---|---|---|
| session | string |
load_mlir_fileLoad a .mlir file from disk into the session as an ir.Module.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to .mlir file |
| session | string | |
| var_name | string |
new_sessionCreate a new named MLIR session with its own ir.Context.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name for the new session |
parse_mlirParse MLIR text into an ir.Module and store as a session variable.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| src * | string | MLIR source text |
| var_name | string | Variable name to store the module |
replace_all_usesReplace all uses of one value with another (SSA use-def chain).| Parameter | Type | Description |
|---|---|---|
| new_value_expr * | string | Python expression evaluating to the new Value |
| old_value_expr * | string | Python expression evaluating to the old Value (e.g. 'op.results[0]') |
| session | string |
resetClear current IR state and transformation history.| Parameter | Type | Description |
|---|---|---|
| session | string |
rewindUndo the last N pass applications, rewinding IR state.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| steps | integer | Number of steps to rewind |
run_pipelineSet initial MLIR IR and apply a pass pipeline. Initializes transformation history. Pipeline can be just pass names (e.g. 'canonicalize,cse') — it will be auto-wrapped with 'builtin.module(...)' if needed. Note: history/rewind only tracks this tool and chain_pipeline, not execute_python mutations.| Parameter | Type | Description |
|---|---|---|
| mlir * | string | MLIR source text |
| pipeline * | string | Pass pipeline string |
| session | string |
save_mlir_fileWrite a module variable to a .mlir file.| Parameter | Type | Description |
|---|---|---|
| path * | string | Destination file path |
| session | string | |
| var_name | string |
symbol_lookupLook up an operation by symbol name (e.g. function name) in a module.| Parameter | Type | Description |
|---|---|---|
| result_var | string | Variable to store the found operation |
| session | string | |
| symbol_name * | string | Symbol name to look up |
| var_name | string | Module variable to search in |
verify_moduleVerify a module and return diagnostics.| Parameter | Type | Description |
|---|---|---|
| session | string | |
| var_name | string |
walk_operationsWalk the operation tree and return a structured list of operations. Optionally filter by op name pattern (substring match).| Parameter | Type | Description |
|---|---|---|
| filter | string | Op name substring filter (e.g. 'arith' or 'func.func') |
| session | string | |
| var_name | string |
Security checks
6 checks have not been run yet.