From 0ff794a6100c3e3bff653ecc844f7edda97f0975 Mon Sep 17 00:00:00 2001 From: ZhiGang Yuan <83761884+yuanzhigang-source@users.noreply.github.com> Date: Sat, 25 Jun 2022 12:06:48 +0800 Subject: [PATCH] wrong words fixed (#386) * Update intermediate_representation.md fix bug * Update accelerator_programming.md * Update memory_allocator.md * Update memory_allocator.md * Update accelerator_programming.md * Update accelerator_programming.md * Update system_architecture.md * Update system_problem.md * Update ad.md * Update compute_schedule_and_execute.md * Update compute_schedule_and_execute.md * Update ad.md * Update compute_schedule_and_execute.md * Update compute_schedule_and_execute.md * Update compute_schedule_and_execute.md * Update compute_schedule_and_execute.md * delete delete something * Update explainable_ai.md * Update explainable_ai.md * Update explainable_ai.md * Update type_system_and_static_analysis.md Co-authored-by: Dalong <39682259+eedalong@users.noreply.github.com> Co-authored-by: Cheng Lai --- chapter_frontend_and_ir/type_system_and_static_analysis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter_frontend_and_ir/type_system_and_static_analysis.md b/chapter_frontend_and_ir/type_system_and_static_analysis.md index eb83195..bd3403c 100644 --- a/chapter_frontend_and_ir/type_system_and_static_analysis.md +++ b/chapter_frontend_and_ir/type_system_and_static_analysis.md @@ -30,7 +30,7 @@ Damas)对HM类型推导方法进行了详尽的分析和证明 :cite:`1982Prin 类型推导:在抽象释义的基础上,编译器推断出程序中变量或表达式的抽象类型,方便后续利用类型信息进行编译优化。 -泛型特化:泛型特化的前提是编译器在编译期间可以进行类型推导,提供类型的上下文。在编译期间,编译器通过类型推导确定调用函数函数时的类型,然后,编译器会通过泛型特化,进行类型取代,为每个类型生成一个对应的函数方法。 +泛型特化:泛型特化的前提是编译器在编译期间可以进行类型推导,提供类型的上下文。在编译期间,编译器通过类型推导确定调用函数时的类型,然后,编译器会通过泛型特化,进行类型取代,为每个类型生成一个对应的函数方法。 接下来以MindSpore框架为例,简要介绍一下静态分析模块的具体实现。MindSpore采用抽象释义的方法,对抽象值做不确定的抽象语义的解释执行,函数图中每个节点的抽象值是所期望得到的程序静态信息。基本的抽象释义方法流程可以理解为,从MindIR的顶层函数图入口开始解释执行,将函数图中所有节点进行拓扑排序,根据节点的语义递归推导各节点的抽象值。当遇到函数子图时,递归进入函数子图进行解释执行,最后返回顶层函数输出节点的抽象值。根据抽象释义方法流程,MindSpore的静态分析模块主要分为抽象域模块、缓存模块、语义推导模块和控制流处理模块。