Explorer
Explorer is an interactive GUI tool from TT-MLIR for visualizing and experimenting with model graphs (including Tenstorrent's MLIR dialects), compiling and executing your model on Tenstorrent hardware.
What is Explorer?
Explorer is a visual debugging and performance analysis tool that allows you to:
- Visualize MLIR graphs: Inspect your model graph with hierarchical visualization
- Compile and execute your model: Compile your model to Tenstorrent hardware and execute it
- Debug performance: Identify bottlenecks and see affects of optimizations on runtime performance
Building with Explorer
Explorer is only available when building TT-XLA from source. It is not included in pre-built wheels. It is disabled by default in TT-XLA. You can enable it by building with the TTXLA_ENABLE_EXPLORER CMake option:
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DTTXLA_ENABLE_EXPLORER=ON
cmake --build build
Note: Enabling Explorer also enables Tracy performance tracing (
TTMLIR_ENABLE_PERF_TRACE), which may slow down execution. For production deployments or performance benchmarking, consider building with-DTTXLA_ENABLE_EXPLORER=OFF.
Using Explorer
After building with Explorer enabled, launch the tool by running:
tt-explorer
This will start the interactive GUI for analyzing your model's compilation and execution.
Example graph to try out
module attributes {} {
func.func @forward(%arg0: tensor<64x128xbf16>, %arg1: tensor<64x128xbf16>, %arg2: tensor<64x128xbf16>, %arg3: tensor<64x128xbf16>) -> tensor<64x128xbf16> {
%0 = ttir.empty() : tensor<64x128xbf16>
%1 = "ttir.add"(%arg0, %arg1, %0) : (tensor<64x128xbf16>, tensor<64x128xbf16>, tensor<64x128xbf16>) -> tensor<64x128xbf16>
%2 = ttir.empty() : tensor<64x128xbf16>
%3 = "ttir.add"(%arg2, %arg3, %2) : (tensor<64x128xbf16>, tensor<64x128xbf16>, tensor<64x128xbf16>) -> tensor<64x128xbf16>
%4 = ttir.empty() : tensor<64x128xbf16>
%5 = "ttir.add"(%1, %3, %4) : (tensor<64x128xbf16>, tensor<64x128xbf16>, tensor<64x128xbf16>) -> tensor<64x128xbf16>
%6 = ttir.empty() : tensor<64x128xbf16>
%7 = "ttir.relu"(%5, %6) : (tensor<64x128xbf16>, tensor<64x128xbf16>) -> tensor<64x128xbf16>
return %7 : tensor<64x128xbf16>
}
}
Learn More
For detailed documentation on how to use Explorer, including tutorials and advanced features, see the TT-MLIR Explorer Documentation.
Explorer is based on Google's Model Explorer with added support for Tenstorrent hardware compilation and execution.