commit | 163547ad0f0a647ac68c446039fbfd69f4f0ab74 | [log] [tgz] |
---|---|---|
author | Ben Vanik <ben.vanik@gmail.com> | Mon May 15 11:59:13 2023 -0700 |
committer | GitHub <noreply@github.com> | Mon May 15 18:59:13 2023 +0000 |
tree | d646c3af667bb88a4235ea1ae6e05ac7c22c8e6b | |
parent | e5d990b29b857c397f5b61fc9fbae22df2fd0755 [diff] |
Improving iree-dump-module output. (#13614) FlatBuffer JSON is still available but by default a much more readable output helps identify section sizes, exported function signatures, and dependencies/requirements. Example output: ``` //===--------------------------------------------------------------------------------------------------------------===// // @module : version 0 //===--------------------------------------------------------------------------------------------------------------===// Required Types: [ 0] i32 [ 1] i64 [ 2] !hal.allocator [ 3] !hal.buffer [ 4] !hal.buffer_view [ 5] !hal.command_buffer [ 6] !hal.descriptor_set_layout [ 7] !hal.device [ 8] !hal.executable [ 9] !hal.fence [ 10] !hal.pipeline_layout [ 11] !vm.buffer Module Dependencies: hal, version >= 0, required Imported Functions: [ 0] hal.ex.shared_device() -> (!vm.ref<?>) [ 1] hal.allocator.allocate(!vm.ref<?>, i32, i32, i64) -> (!vm.ref<?>) [ 2] hal.buffer.assert(!vm.ref<?>, !vm.ref<?>, !vm.ref<?>, i64, i32, i32) -> () [ 3] hal.buffer.load(!vm.ref<?>, i64, i32) -> (i32) [ 4] hal.buffer_view.create(!vm.ref<?>, i64, i64, i32, i32, tuple<i64>...) -> (!vm.ref<?>) [ 5] hal.buffer_view.assert(!vm.ref<?>, !vm.ref<?>, i32, i32, tuple<i64>...) -> () [ 6] hal.buffer_view.buffer(!vm.ref<?>) -> (!vm.ref<?>) [ 7] hal.command_buffer.create(!vm.ref<?>, i32, i32, i32) -> (!vm.ref<?>) [ 8] hal.command_buffer.finalize(!vm.ref<?>) -> () [ 9] hal.command_buffer.execution_barrier(!vm.ref<?>, i32, i32, i32) -> () [ 10] hal.command_buffer.fill_buffer(!vm.ref<?>, !vm.ref<?>, i64, i64, i32, i32) -> () [ 11] hal.command_buffer.copy_buffer(!vm.ref<?>, !vm.ref<?>, i64, !vm.ref<?>, i64, i64) -> () [ 12] hal.command_buffer.push_constants(!vm.ref<?>, !vm.ref<?>, i32, tuple<i32>...) -> () [ 13] hal.command_buffer.push_descriptor_set(!vm.ref<?>, !vm.ref<?>, i32, tuple<i32, i32, !vm.ref<?>, i64, i64>...) -> () [ 14] hal.command_buffer.dispatch(!vm.ref<?>, !vm.ref<?>, i32, i32, i32, i32) -> () [ 15] hal.descriptor_set_layout.create(!vm.ref<?>, i32, tuple<i32, i32, i32>...) -> (!vm.ref<?>) [ 16] hal.device.allocator(!vm.ref<?>) -> (!vm.ref<?>) [ 17] hal.device.query.i64(!vm.ref<?>, !vm.ref<?>, !vm.ref<?>) -> (i32, i64) [ 18] hal.device.queue.alloca(!vm.ref<?>, i64, !vm.ref<?>, !vm.ref<?>, i32, i32, i32, i64) -> (!vm.ref<?>) [ 19] hal.device.queue.dealloca(!vm.ref<?>, i64, !vm.ref<?>, !vm.ref<?>, !vm.ref<?>) -> () [ 20] hal.device.queue.execute(!vm.ref<?>, i64, !vm.ref<?>, !vm.ref<?>, tuple<!vm.ref<?>>...) -> () [ 21] hal.executable.create(!vm.ref<?>, !vm.ref<?>, !vm.ref<?>, !vm.ref<?>, tuple<!vm.ref<?>>...) -> (!vm.ref<?>) [ 22] hal.fence.create(!vm.ref<?>, i32) -> (!vm.ref<?>) [ 23] hal.fence.await(i32, tuple<!vm.ref<?>>...) -> (i32) [ 24] hal.pipeline_layout.create(!vm.ref<?>, i32, tuple<!vm.ref<?>>...) -> (!vm.ref<?>) Exported Functions: [ 0] main(!vm.ref<?>, !vm.ref<?>) -> (!vm.ref<?>) [ 1] __init() -> () //===--------------------------------------------------------------------------------------------------------------===// // Sections //===--------------------------------------------------------------------------------------------------------------===// Module State: 4 bytes, 6 refs, ~100 bytes total FlatBuffer: 11260 bytes Bytecode: 3456 bytes .rodata[ 0] external 19792 bytes (offset 112 / 70h to 4DC0h) .rodata[ 1] embedded 21 bytes `hal.executable.format` .rodata[ 2] embedded 19 bytes `embedded-elf-x86_64` .rodata[ 3] embedded 7 bytes `input 0` .rodata[ 4] embedded 6 bytes `tensor` .rodata[ 5] embedded 7 bytes `input 1` External .rodata: ~19792 bytes //===--------------------------------------------------------------------------------------------------------------===// // Bytecode : version 0 //===--------------------------------------------------------------------------------------------------------------===// # | Offset | Length | Blocks | i32 # | ref # | Requirements | Aliases ----+----------+----------+--------+-------+-------+--------------+----------------------------------------------------- 0 | 00000000 | 2926 | 11 | 66 | 17 | | main 1 | 00000B70 | 526 | 4 | 8 | 9 | | __init //===--------------------------------------------------------------------------------------------------------------===// // Debug Information //===--------------------------------------------------------------------------------------------------------------===// // NOTE: debug databases are large and should be stripped in deployed artifacts. Locations: 136 ```
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.