Crates.io | spirt |
lib.rs | spirt |
version | |
source | src |
created_at | 2021-08-19 16:40:28.42585 |
updated_at | 2024-10-07 09:28:35.02957 |
description | Shader-focused IR to target, transform and translate from. |
homepage | https://github.com/rust-gpu/spirt |
repository | https://github.com/rust-gpu/spirt/tree/0.4.0 |
max_upload_size | |
id | 439689 |
Cargo.toml error: | TOML parse error at line 26, column 1 | 26 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
SPIR-🇹 is a research project aimed at exploring shader-oriented IR designs derived from SPIR-V, and producing a framework around such an IR to facilitate advanced compilation pipelines, beyond what existing SPIR-V tooling allows for.
Such a need arose in the Rust-GPU project, which requires a variety of legalization passes to turn general-purpose (Rust1) code operating on untyped memory, into GPU-friendly direct data-flow.
Our goal is to replace the existing Rust-GPU SPIR-V legalizations passes with SPIR-🇹 equivalents - but even more imporantly, SPIR-🇹 should allow writing much more powerful legalization/optimization passes, that would've been unfathomable2 for direct SPIR-V manipulation.
1 Rust is not unique in its needs here, and more languages (or IRs) could eventually make use of such a framework, but the initial design and implementation work has focused on Rust-GPU
2 not outright impossible, but requiring excessive development/maintenance cost, having to constantly balance correctness and power (more conservative passes are easier to trust), etc.
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Khronos Group Inc., or any of its subsidiaries or its affiliates. The official Khronos Group Inc. website can be found at https://www.khronos.org.
The names SPIR, SPIR-V, as well as related names, marks, emblems and images are trademarks of their respective owners.
Additional context: the name of this project is a pun on SPIR-V, and entirely unrelated to SPIR (the older IR standard).
🚧 This project is in active design and development, many details can and will change 🚧
If you're interested in using SPIR-🇹 yourself, you may want to first take a look at the issue tracker for relevant issues, and even open new ones describing your usecase.
With the initial focus being on Rust-GPU's usecase, various (otherwise desirable) functionality/APIs/docs may be lacking, or rapidly changing - at the same time, discussions around widening the scope and usability of SPIR-🇹 in the long term are still welcome.
Kernel
dialect of SPIR-V
Kernel
SPIR-V is much closer to LLVM IR, than Shader
SPIR-V, and
as such tooling oriented around LLVM is more likely to be a better fit
IR data types:
|
Framework utilities:
Passes (to/from/on SPIR-🇹):
|
GLSL (
WGSL (
|
SPIR-🇹
|
SPIR-V (
|
(and the vision of how SPIR-🇹 fits into it)
The distinction being made here is between:
We welcome community contributions to this project.
Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.
Any contribution intentionally submitted for inclusion shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:
This contribution is dual licensed under EITHER OF
at your option.
For clarity, "your" refers to any licensee/user of the contribution.