├── 01_HelloWorld.md ├── 02_词法分析.md ├── 03_语法分析.md ├── 04_语义分析.md ├── 05_AST运行时.md ├── 06_熟悉MLIR.md ├── 07_熟悉FleetCompilerIR.md ├── 08_从AST到IR.md ├── 09_IR转换.md ├── 10_Shape Inference.md ├── 11_Canonicalize.md ├── 12_TargetBackend.md ├── 13_设计虚拟机.md ├── 14_生成字节码.md ├── 15_python版本的虚拟机.md ├── LICENSE ├── README.md ├── code └── 01 │ ├── hello.py │ └── hello_compiler.py └── images ├── bc.png ├── bc_vm_layout.png └── lexer.png /01_HelloWorld.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/01_HelloWorld.md -------------------------------------------------------------------------------- /02_词法分析.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/02_词法分析.md -------------------------------------------------------------------------------- /03_语法分析.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/03_语法分析.md -------------------------------------------------------------------------------- /04_语义分析.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/04_语义分析.md -------------------------------------------------------------------------------- /05_AST运行时.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/05_AST运行时.md -------------------------------------------------------------------------------- /06_熟悉MLIR.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/06_熟悉MLIR.md -------------------------------------------------------------------------------- /07_熟悉FleetCompilerIR.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/07_熟悉FleetCompilerIR.md -------------------------------------------------------------------------------- /08_从AST到IR.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/08_从AST到IR.md -------------------------------------------------------------------------------- /09_IR转换.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/09_IR转换.md -------------------------------------------------------------------------------- /10_Shape Inference.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/10_Shape Inference.md -------------------------------------------------------------------------------- /11_Canonicalize.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/11_Canonicalize.md -------------------------------------------------------------------------------- /12_TargetBackend.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/12_TargetBackend.md -------------------------------------------------------------------------------- /13_设计虚拟机.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/13_设计虚拟机.md -------------------------------------------------------------------------------- /14_生成字节码.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/14_生成字节码.md -------------------------------------------------------------------------------- /15_python版本的虚拟机.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/15_python版本的虚拟机.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/README.md -------------------------------------------------------------------------------- /code/01/hello.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/code/01/hello.py -------------------------------------------------------------------------------- /code/01/hello_compiler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/code/01/hello_compiler.py -------------------------------------------------------------------------------- /images/bc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/images/bc.png -------------------------------------------------------------------------------- /images/bc_vm_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/images/bc_vm_layout.png -------------------------------------------------------------------------------- /images/lexer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexshuang/write-your-own-ai-compiler/HEAD/images/lexer.png --------------------------------------------------------------------------------