xdsl-0.9.1


توضیحات

xDSL
ویژگی مقدار
سیستم عامل -
نام فایل xdsl-0.9.1
نام xdsl
نسخه کتابخانه 0.9.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Mathieu Fehr <mathieu.fehr@ed.ac.uk>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/xdsl/
مجوز Apache License v2.0 with LLVM Exceptions
<!-- markdownlint-disable-next-line MD041 --> [![Build Status for the Core backend](https://github.com/xdslproject/xdsl/actions/workflows/ci-core.yml/badge.svg)](https://github.com/xdslproject/xdsl/actions/workflows/ci-core.yml?query=workflow%3A%22CI+-+Python+application%22++) [![PyPI version](https://badge.fury.io/py/xdsl.svg)](https://badge.fury.io/py/xdsl) [![Downloads](https://static.pepy.tech/badge/xdsl)](https://www.pepy.tech/projects/xdsl) [![Downloads](https://static.pepy.tech/badge/xdsl/week)](https://pepy.tech/project/xdsl) [![Code Coverage](https://codecov.io/gh/xdslproject/xdsl/main/graph/badge.svg)](https://codecov.io/gh/xdslproject/xdsl) [![Zulip Status](https://img.shields.io/badge/chat-on%20zulip-%2336C5F0)](https://xdsl.zulipchat.com) # xDSL: A Python-native SSA Compiler Framework [xDSL](http://www.xdsl.dev) is a Python-native framework for building compiler infrastructure. It provides *[SSA-based intermediate representations (IRs)](https://en.wikipedia.org/wiki/Static_single-assignment_form)* and Pythonic APIs to define, assemble, and optimize custom IRs—all with seamless compatibility with [MLIR](https://mlir.llvm.org/) from the LLVM project. Inspired by MLIR, xDSL enables smooth translation of programs and abstractions between frameworks. This lets users prototype compilers entirely in Python, while still accessing MLIR's powerful optimization and code generation pipeline. All IRs in xDSL employ a unified SSA-based data structure, with regions and basic blocks, making it easy to write generic analyses and transformation passes. xDSL supports assembling compilers from predefined or custom IRs, and organizing transformations across a multi-level IR stack. This layered approach enables abstraction-specific optimization passes, similar to the architecture of projects like [Devito](https://github.com/devitocodes/devito), [PSyclone](https://github.com/stfc/PSyclone), and [Firedrake](https://github.com/firedrakeproject/firedrake). In short, xDSL makes it possible to: - Prototype compilers quickly in Python - Build DSLs with custom IRs - Run analyses and transformations with simple scripts - Interoperate smoothly with MLIR and benefit from LLVM's backend ## Contents - [Installation](#installation) - [Getting Started](#getting-started) - [Discussion](#discussion) ## Installation To contribute to xDSL, follow the [xDSL Developer Setup Guide](CONTRIBUTING.md). To use xDSL as part of a larger project for developing your own compiler, just install [xDSL via pip](https://pypi.org/project/xdsl/): ```bash pip install xdsl ``` To quickly install xDSL for development and contribution purposes, use: ``` bash pip install xdsl[dev] ``` This may be useful for projects wanting to replicate the xDSL testing setup. *Note:* This version of xDSL is validated against a specific MLIR version, interoperability with other versions is not guaranteed. The supported MLIR version is 21.1.1. > [!IMPORTANT] > > ### Experimental Pyright Features > > xDSL currently relies on an experimental feature of Pyright called TypeForm. > TypeForm is [in discussion](https://discuss.python.org/t/pep-747-typeexpr-type-hint-for-a-type-expression/55984) > and will likely land in some future version of Python. > > For xDSL to type check correctly using Pyright, please add this to your `pyproject.toml`: > > ```toml > [tool.pyright] > enableExperimentalFeatures = true > ``` ### Subprojects With Extra Dependencies xDSL has a number of subprojects, some of which require extra dependencies. To keep the set of dependencies to a minimum, these extra dependencies have to be specified explicitly, e.g. by using: ``` bash pip install xdsl[gui] # or [jax], [riscv] ``` ## Getting Started Check out the dedicated [Getting Started guide](https://docs.xdsl.dev) for a comprehensive tutorial. To get familiar with xDSL, we recommend starting with our Jupyter notebooks. The notebooks provide hands-on examples and documentation of xDSL's core concepts: data structures, the Python-embedded abstraction definition language, and end-to-end custom compilers construction, like a database compiler. There also exists a small documentation showing how to connect xDSL with MLIR for users interested in that use case. - [A Database example](https://xdsl.dev/xdsl/lab/index.html?path=database_example.ipynb) - [A simple introduction](https://xdsl.dev/xdsl/lab/index.html?path=tutorial.ipynb) - [A DSL for defining new IRs](https://xdsl.dev/xdsl/lab/index.html?path=irdl.ipynb) - [Connecting xDSL with MLIR](docs/guides/mlir_interoperation.md) We provide a [Makefile](https://github.com/xdslproject/xdsl/blob/main/Makefile) containing a lot of common tasks, which might provide an overview of common actions. ## Discussion You can also join the discussion at our [Zulip chat room](https://xdsl.zulipchat.com), kindly supported by community hosting from [Zulip](https://zulip.com/).


نیازمندی

مقدار نام
- immutabledict<4.2.3
- typing-extensions<5,>=4.7
- ordered-set==4.1.0
xtr toml<0.11;
xtr pytest-cov;
xtr coverage<8.0.0;
xtr ipykernel;
xtr pytest<8.5;
xtr nbval<0.12;
xtr filecheck==1.0.3;
xtr lit<19.0.0;
xtr marimo<0.18,>=0.17;
xtr prek~=0.3.1;
xtr ruff==0.14.7;
xtr nbconvert<8.0.0,>=7.7.2;
xtr textual-dev==1.8.0;
xtr pytest-asyncio==1.2.0;
xtr pyright==1.1.407;
xtr sympy==1.14.0;
xtr textual<7,>=6;
xtr pyclip==0.7;
xtr llvmlite~=0.46.0;


زبان مورد نیاز

مقدار نام
>=3.10 Python


نحوه نصب


نصب پکیج whl xdsl-0.9.1:

    pip install xdsl-0.9.1.whl


نصب پکیج tar.gz xdsl-0.9.1:

    pip install xdsl-0.9.1.tar.gz