Skip to content

Instantly share code, notes, and snippets.

@wangkuiyi
Created March 14, 2023 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wangkuiyi/33cff4f5f14194806ca39582de8aca23 to your computer and use it in GitHub Desktop.
Save wangkuiyi/33cff4f5f14194806ca39582de8aca23 to your computer and use it in GitHub Desktop.
digraph G {
node [shape=rect];
jax [label="JAX program in Python"];
jaxpr [label="JAXPR"];
pytorch [label="PyTorch program in Python"];
fxgraph [label="torch.fx.Graph"];
stablehlo [label="StableHLO semantics\nin MLIR source file.\nLooks like Fortran code"];
section [label="Dispatch sections\nin StableHLO semantics.\nEach compiled into a kernel"];
driver [label="A program that\nlaunches the kernels\nin StableHLO"];
vmvx [label="Driver in VMVX\ninstructions executed\nby IREE runtime"];
spirv [label="SPIR-V code\nof each section\nlooks like assembly code"];
msl [label="Metal Shader Language code\nof each section\nLooks like C++"];
vmfb [label="the VMFB container file\ngoing into the iOS app bundle"];
jax -> jaxpr [label=" jax.make_jaxpr"];
jaxpr -> stablehlo [label=" github.com/openxla/iree-jax"];
pytorch -> fxgraph [label=" functorch"];
fxgraph -> stablehlo [label=" github.com/llvm/torch_mlir"];
stablehlo -> section [label=" split"];
stablehlo -> driver -> vmvx -> vmfb;
section -> spirv -> msl -> vmfb;
}
@wangkuiyi
Copy link
Author

image

@wangkuiyi
Copy link
Author

This gist document what I learned from @antiagainst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment