[{"data":1,"prerenderedAt":3521},["ShallowReactive",2],{"learning-material-cmu-15-779-tvm-slides-zh":3},{"courseSlug":4,"slug":5,"fileName":6,"title":7,"description":8,"language":9,"sourcePdf":10,"sourceLanguage":11,"body":12,"toc":3404,"bytes":3519,"downloadPath":3520},"cmu-15-779","tvm-slides-zh","tvm-slides-zh.md","TVM：面向深度学习的自动化端到端优化编译器","TVM OSDI 2018 幻灯片中文译稿。","zh","\u002Fmaterials\u002Fcmu-15-779\u002Foriginals\u002Ftvm-slides-original.pdf","en",{"type":13,"children":14},"root",[15,23,30,93,99,111,121,126,132,140,162,168,176,181,187,195,200,206,214,219,225,233,238,246,258,570,578,587,593,601,611,617,625,635,641,649,660,666,674,679,685,693,697,703,711,715,721,729,733,739,747,751,757,765,769,775,783,787,793,801,806,824,830,838,849,855,863,868,874,882,894,900,908,928,934,942,955,960,966,974,979,985,993,998,1004,1012,1021,1032,1068,1074,1082,1087,1094,1100,1108,1116,1124,1129,1135,1143,1151,1159,1164,1170,1178,1186,1194,1205,1211,1219,1231,1237,1245,1257,1263,1271,1282,1288,1296,1307,1313,1321,1332,1338,1346,1364,1370,1378,1392,1398,1406,1420,1426,1434,1446,1452,1460,1472,1478,1486,1491,1497,1505,1516,1522,1530,1540,1546,1554,1559,1565,1573,1578,1584,1592,1597,1603,1611,1621,1628,1633,1639,1647,1659,1665,1673,1681,1699,1704,1710,1718,1730,1736,1744,1752,1785,1791,1799,1804,1810,1818,1823,1829,1837,1845,1863,1869,1877,1882,1888,1896,1901,1907,1915,1926,1932,1940,1951,1957,1965,1976,1982,1990,1995,2003,2008,2014,2022,2034,2042,2047,2053,2061,2066,2072,2080,2085,2091,2099,2107,2112,2118,2126,2134,2139,2145,2153,2158,2164,2172,2177,2184,2189,2195,2203,2208,2226,2232,2240,2245,2268,2274,2282,2287,2293,2301,2306,2312,2320,2332,2338,2346,2351,2357,2365,2370,2376,2384,2389,2395,2403,2422,2428,2436,2448,2454,2462,2473,2479,2487,2492,2498,2506,2511,2517,2525,2530,2536,2544,2549,2555,2563,2576,2582,2590,2608,2614,2622,2634,2640,2648,2653,2659,2667,2678,2684,2692,2704,2710,2718,2737,2743,2751,2763,2769,2777,2788,2794,2802,2807,2831,2837,2845,2850,2855,2861,2869,2881,2887,2895,2907,2913,2921,2932,2938,2946,2951,2957,2965,2970,2976,2984,2989,3007,3013,3021,3033,3039,3047,3052,3069,3075,3083,3101,3107,3115,3127,3133,3141,3146,3164,3170,3178,3189,3195,3203,3215,3221,3229,3240,3246,3254,3265,3271,3279,3284,3302,3308,3316,3328,3346,3352,3360,3365,3388,3399],{"type":16,"tag":17,"props":18,"children":20},"element","h1",{"id":19},"tvm面向深度学习的自动化端到端优化编译器",[21],{"type":22,"value":7},"text",{"type":16,"tag":24,"props":25,"children":27},"h2",{"id":26},"osdi-2018-幻灯片中文翻译",[28],{"type":22,"value":29},"OSDI 2018 幻灯片中文翻译",{"type":16,"tag":31,"props":32,"children":33},"ul",{},[34,53,63,73,83],{"type":16,"tag":35,"props":36,"children":37},"li",{},[38,44,46],{"type":16,"tag":39,"props":40,"children":41},"strong",{},[42],{"type":22,"value":43},"来源文件：",{"type":22,"value":45}," ",{"type":16,"tag":47,"props":48,"children":50},"code",{"className":49},[],[51],{"type":22,"value":52},"osdi18_slides_chen.pdf",{"type":16,"tag":35,"props":54,"children":55},{},[56,61],{"type":16,"tag":39,"props":57,"children":58},{},[59],{"type":22,"value":60},"页数：",{"type":22,"value":62}," 110 页",{"type":16,"tag":35,"props":64,"children":65},{},[66,71],{"type":16,"tag":39,"props":67,"children":68},{},[69],{"type":22,"value":70},"说明：",{"type":22,"value":72}," 本译稿按 PDF 页码逐页对应。Keynote 动画导出会把一张幻灯片拆成多个页面；对于仅新增少量元素的构建页，译文明确写出新增内容，同时保留该页可见的全部标签、公式、代码和图表说明。",{"type":16,"tag":35,"props":74,"children":75},{},[76,81],{"type":16,"tag":39,"props":77,"children":78},{},[79],{"type":22,"value":80},"术语约定：",{"type":22,"value":82}," TVM、VTA、CUDA、LLVM、cuDNN、Halide、Loopy、GEMM、JIT 等专有名词保留英文；首次出现时给出中文释义。",{"type":16,"tag":35,"props":84,"children":85},{},[86,91],{"type":16,"tag":39,"props":87,"children":88},{},[89],{"type":22,"value":90},"图表说明：",{"type":22,"value":92}," 源 PDF 中的柱线、流程框和加速器示意图属于绘图对象，译稿翻译其可提取文字并描述含义；具体柱高和布局请结合原 PDF 对照。",{"type":16,"tag":24,"props":94,"children":96},{"id":95},"第-1-页tvm面向深度学习的自动化端到端优化编译器",[97],{"type":22,"value":98},"第 1 页｜TVM：面向深度学习的自动化端到端优化编译器",{"type":16,"tag":100,"props":101,"children":102},"p",{},[103],{"type":16,"tag":104,"props":105,"children":110},"img",{"alt":106,"src":107,"width":108,"height":109},"TVM 原始幻灯片第 1 页：TVM：面向深度学习的自动化端到端优化编译器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-001.webp",1600,900,[],{"type":16,"tag":100,"props":112,"children":113},{},[114,119],{"type":16,"tag":39,"props":115,"children":116},{},[117],{"type":22,"value":118},"作者：",{"type":22,"value":120}," Tianqi Chen、Thierry Moreau、Ziheng Jiang、Lianmin Zheng、Eddie Yan、Meghan Cowan、Haichen Shen、Leyuan Wang、Yuwei Hu、Luis Ceze、Carlos Guestrin、Arvind Krishnamurthy。",{"type":16,"tag":100,"props":122,"children":123},{},[124],{"type":22,"value":125},"本页是 OSDI 2018 报告的标题页。",{"type":16,"tag":24,"props":127,"children":129},{"id":128},"第-2-页合作人员",[130],{"type":22,"value":131},"第 2 页｜合作人员",{"type":16,"tag":100,"props":133,"children":134},{},[135],{"type":16,"tag":104,"props":136,"children":139},{"alt":137,"src":138,"width":108,"height":109},"TVM 原始幻灯片第 2 页：合作人员","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-002.webp",[],{"type":16,"tag":100,"props":141,"children":142},{},[143,145,150,152,160],{"type":22,"value":144},"合作实验室：",{"type":16,"tag":39,"props":146,"children":147},{},[148],{"type":22,"value":149},"SAMPL Lab",{"type":22,"value":151},"（",{"type":16,"tag":153,"props":154,"children":158},"a",{"href":155,"rel":156},"https:\u002F\u002Fsampl.cs.washington.edu",[157],"nofollow",[159],{"type":22,"value":155},{"type":22,"value":161},"）。",{"type":16,"tag":24,"props":163,"children":165},{"id":164},"第-3-页故事的开端",[166],{"type":22,"value":167},"第 3 页｜故事的开端",{"type":16,"tag":100,"props":169,"children":170},{},[171],{"type":16,"tag":104,"props":172,"children":175},{"alt":173,"src":174,"width":108,"height":109},"TVM 原始幻灯片第 3 页：故事的开端","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-003.webp",[],{"type":16,"tag":100,"props":177,"children":178},{},[179],{"type":22,"value":180},"本页仅显示章节标题“故事的开端”，引出专用深度学习加速器与编译器之间的关系。",{"type":16,"tag":24,"props":182,"children":184},{"id":183},"第-4-页故事的开端加速器",[185],{"type":22,"value":186},"第 4 页｜故事的开端：加速器",{"type":16,"tag":100,"props":188,"children":189},{},[190],{"type":16,"tag":104,"props":191,"children":194},{"alt":192,"src":193,"width":108,"height":109},"TVM 原始幻灯片第 4 页：故事的开端：加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-004.webp",[],{"type":16,"tag":100,"props":196,"children":197},{},[198],{"type":22,"value":199},"页面中央标出“加速器（Accelerator）”，表示从专用硬件的演进开始叙述。",{"type":16,"tag":24,"props":201,"children":203},{"id":202},"第-5-页故事的开端加速器",[204],{"type":22,"value":205},"第 5 页｜故事的开端：加速器",{"type":16,"tag":100,"props":207,"children":208},{},[209],{"type":16,"tag":104,"props":210,"children":213},{"alt":211,"src":212,"width":108,"height":109},"TVM 原始幻灯片第 5 页：故事的开端：加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-005.webp",[],{"type":16,"tag":100,"props":215,"children":216},{},[217],{"type":22,"value":218},"动画构建页，继续突出“加速器（Accelerator）”这一主题。",{"type":16,"tag":24,"props":220,"children":222},{"id":221},"第-6-页故事的开端via-加速器微代码",[223],{"type":22,"value":224},"第 6 页｜故事的开端：VIA 加速器微代码",{"type":16,"tag":100,"props":226,"children":227},{},[228],{"type":16,"tag":104,"props":229,"children":232},{"alt":230,"src":231,"width":108,"height":109},"TVM 原始幻灯片第 6 页：故事的开端：VIA 加速器微代码","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-006.webp",[],{"type":16,"tag":100,"props":234,"children":235},{},[236],{"type":22,"value":237},"本页展示 VIA 加速器的多线程分块卷积微代码，以及最大池化、批归一化和激活函数的访问模式。寄存器索引由二维仿射函数计算。",{"type":16,"tag":100,"props":239,"children":240},{},[241],{"type":16,"tag":39,"props":242,"children":243},{},[244],{"type":22,"value":245},"(a) 多线程上下文的分块卷积程序（伪代码）",{"type":16,"tag":247,"props":248,"children":253},"pre",{"className":249,"code":251,"language":22,"meta":252},[250],"language-text","\u002F\u002F 虚拟线程 0\n0x00: LOAD(PARAM[ 0-71])          \u002F\u002F LD@TID0\n0x01: LOAD(ACTIV[ 0-24])          \u002F\u002F LD@TID0\n0x02: LOAD(LDBUF[ 0-31])           \u002F\u002F LD@TID0\n0x03: PUSH(LD->EX)                 \u002F\u002F LD@TID0\n0x04: POP (LD->EX)                 \u002F\u002F EX@TID0\n0x05: EXE (ACTIV[0-24], PARAM[0-71], LDBUF[0-31], STBUF[0-7]) \u002F\u002F EX@TID0\n0x06: PUSH(EX->LD)                 \u002F\u002F EX@TID0\n0x07: PUSH(EX->ST)                 \u002F\u002F EX@TID0\n0x08: POP (EX->ST)                  \u002F\u002F ST@TID0\n0x09: STOR(STBUF[0-7])              \u002F\u002F ST@TID0\n0x0A: PUSH(ST->EX)                  \u002F\u002F ST@TID0\n\n\u002F\u002F 虚拟线程 1\n0x0B: LOAD(ACTIV[25-50])            \u002F\u002F LD@TID1\n0x0C: LOAD(LDBUF[32-63])            \u002F\u002F LD@TID1\n0x0D: PUSH(LD->EX)                  \u002F\u002F LD@TID1\n0x0E: POP (LD->EX)                  \u002F\u002F EX@TID1\n0x0F: EXE (ACTIV[25-50], PARAM[0-71], LDBUF[32-63], STBUF[32-39]) \u002F\u002F EX@TID1\n0x10: PUSH(EX->LD)                  \u002F\u002F EX@TID1\n0x11: PUSH(EX->ST)                  \u002F\u002F EX@TID1\n0x12: POP (EX->ST)                  \u002F\u002F ST@TID1\n0x13: STOR(STBUF[32-39])             \u002F\u002F ST@TID1\n0x14: PUSH(ST->EX)                  \u002F\u002F ST@TID1\n\n\u002F\u002F 虚拟线程 2\n0x15: POP (EX->LD)                  \u002F\u002F LD@TID2\n0x16: LOAD(PARAM[0-71])              \u002F\u002F LD@TID2\n0x17: LOAD(ACTIV[0-24])              \u002F\u002F LD@TID2\n0x18: LOAD(LDBUF[0-31])              \u002F\u002F LD@TID2\n0x19: PUSH(LD->EX)                  \u002F\u002F LD@TID2\n0x1A: POP (LD->EX)                  \u002F\u002F EX@TID2\n0x1B: POP (ST->EX)                  \u002F\u002F EX@TID2\n0x1C: EXE (ACTIV[0-24], PARAM[0-71], LDBUF[0-31], STBUF[0-7]) \u002F\u002F EX@TID2\n0x1D: PUSH(EX->ST)                  \u002F\u002F EX@TID2\n0x1E: POP (EX->ST)                  \u002F\u002F ST@TID2\n0x1F: STOR(STBUF[0-7])               \u002F\u002F ST@TID2\n\n\u002F\u002F 虚拟线程 3\n0x20: POP (EX->LD)                  \u002F\u002F LD@TID3\n0x21: LOAD(ACTIV[25-50])             \u002F\u002F LD@TID3\n0x22: LOAD(LDBUF[32-63])             \u002F\u002F LD@TID3\n0x23: PUSH(LD->EX)                   \u002F\u002F LD@TID3\n0x24: POP (LD->EX)                   \u002F\u002F EX@TID3\n0x25: POP (ST->EX)                   \u002F\u002F EX@TID2\n0x26: EXE (ACTIV[25-50], PARAM[0-71], LDBUF[32-63], STBUF[32-39]) \u002F\u002F EX@TID3\n0x27: PUSH(EX->ST)                   \u002F\u002F EX@TID3\n0x28: POP (EX->ST)                   \u002F\u002F ST@TID3\n0x29: STOR(STBUF[32-39])             \u002F\u002F ST@TID3\n","",[254],{"type":16,"tag":47,"props":255,"children":256},{"__ignoreMap":252},[257],{"type":22,"value":251},{"type":16,"tag":100,"props":259,"children":260},{},[261,266,268,421,423,544,546,552,554,560,562,568],{"type":16,"tag":39,"props":262,"children":263},{},[264],{"type":22,"value":265},"(b) 卷积访问模式：",{"type":22,"value":267}," 对 ",{"type":16,"tag":269,"props":270,"children":273},"span",{"className":271},[272],"katex",[274,339],{"type":16,"tag":269,"props":275,"children":278},{"className":276},[277],"katex-mathml",[279],{"type":16,"tag":280,"props":281,"children":283},"math",{"xmlns":282},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML",[284],{"type":16,"tag":285,"props":286,"children":287},"semantics",{},[288,332],{"type":16,"tag":289,"props":290,"children":291},"mrow",{},[292,298,304,310,316,322,327],{"type":16,"tag":293,"props":294,"children":295},"mi",{},[296],{"type":22,"value":297},"y",{"type":16,"tag":299,"props":300,"children":301},"mo",{},[302],{"type":22,"value":303},"∈",{"type":16,"tag":299,"props":305,"children":307},{"stretchy":306},"false",[308],{"type":22,"value":309},"[",{"type":16,"tag":311,"props":312,"children":313},"mn",{},[314],{"type":22,"value":315},"0",{"type":16,"tag":299,"props":317,"children":319},{"separator":318},"true",[320],{"type":22,"value":321},",",{"type":16,"tag":293,"props":323,"children":324},{},[325],{"type":22,"value":326},"i",{"type":16,"tag":299,"props":328,"children":329},{"stretchy":306},[330],{"type":22,"value":331},")",{"type":16,"tag":333,"props":334,"children":336},"annotation",{"encoding":335},"application\u002Fx-tex",[337],{"type":22,"value":338},"y \\in [0,i)",{"type":16,"tag":269,"props":340,"children":343},{"className":341,"ariaHidden":318},[342],"katex-html",[344,379],{"type":16,"tag":269,"props":345,"children":348},{"className":346},[347],"base",[349,355,363,369,375],{"type":16,"tag":269,"props":350,"children":354},{"className":351,"style":353},[352],"strut","height:0.7335em;vertical-align:-0.1944em;",[],{"type":16,"tag":269,"props":356,"children":361},{"className":357,"style":360},[358,359],"mord","mathnormal","margin-right:0.0359em;",[362],{"type":22,"value":297},{"type":16,"tag":269,"props":364,"children":368},{"className":365,"style":367},[366],"mspace","margin-right:0.2778em;",[],{"type":16,"tag":269,"props":370,"children":373},{"className":371},[372],"mrel",[374],{"type":22,"value":303},{"type":16,"tag":269,"props":376,"children":378},{"className":377,"style":367},[366],[],{"type":16,"tag":269,"props":380,"children":382},{"className":381},[347],[383,388,394,399,405,410,415],{"type":16,"tag":269,"props":384,"children":387},{"className":385,"style":386},[352],"height:1em;vertical-align:-0.25em;",[],{"type":16,"tag":269,"props":389,"children":392},{"className":390},[391],"mopen",[393],{"type":22,"value":309},{"type":16,"tag":269,"props":395,"children":397},{"className":396},[358],[398],{"type":22,"value":315},{"type":16,"tag":269,"props":400,"children":403},{"className":401},[402],"mpunct",[404],{"type":22,"value":321},{"type":16,"tag":269,"props":406,"children":409},{"className":407,"style":408},[366],"margin-right:0.1667em;",[],{"type":16,"tag":269,"props":411,"children":413},{"className":412},[358,359],[414],{"type":22,"value":326},{"type":16,"tag":269,"props":416,"children":419},{"className":417},[418],"mclose",[420],{"type":22,"value":331},{"type":22,"value":422},"、",{"type":16,"tag":269,"props":424,"children":426},{"className":425},[272],[427,475],{"type":16,"tag":269,"props":428,"children":430},{"className":429},[277],[431],{"type":16,"tag":280,"props":432,"children":433},{"xmlns":282},[434],{"type":16,"tag":285,"props":435,"children":436},{},[437,470],{"type":16,"tag":289,"props":438,"children":439},{},[440,445,449,453,457,461,466],{"type":16,"tag":293,"props":441,"children":442},{},[443],{"type":22,"value":444},"x",{"type":16,"tag":299,"props":446,"children":447},{},[448],{"type":22,"value":303},{"type":16,"tag":299,"props":450,"children":451},{"stretchy":306},[452],{"type":22,"value":309},{"type":16,"tag":311,"props":454,"children":455},{},[456],{"type":22,"value":315},{"type":16,"tag":299,"props":458,"children":459},{"separator":318},[460],{"type":22,"value":321},{"type":16,"tag":293,"props":462,"children":463},{},[464],{"type":22,"value":465},"j",{"type":16,"tag":299,"props":467,"children":468},{"stretchy":306},[469],{"type":22,"value":331},{"type":16,"tag":333,"props":471,"children":472},{"encoding":335},[473],{"type":22,"value":474},"x \\in [0,j)",{"type":16,"tag":269,"props":476,"children":478},{"className":477,"ariaHidden":318},[342],[479,506],{"type":16,"tag":269,"props":480,"children":482},{"className":481},[347],[483,488,493,497,502],{"type":16,"tag":269,"props":484,"children":487},{"className":485,"style":486},[352],"height:0.5782em;vertical-align:-0.0391em;",[],{"type":16,"tag":269,"props":489,"children":491},{"className":490},[358,359],[492],{"type":22,"value":444},{"type":16,"tag":269,"props":494,"children":496},{"className":495,"style":367},[366],[],{"type":16,"tag":269,"props":498,"children":500},{"className":499},[372],[501],{"type":22,"value":303},{"type":16,"tag":269,"props":503,"children":505},{"className":504,"style":367},[366],[],{"type":16,"tag":269,"props":507,"children":509},{"className":508},[347],[510,514,519,524,529,533,539],{"type":16,"tag":269,"props":511,"children":513},{"className":512,"style":386},[352],[],{"type":16,"tag":269,"props":515,"children":517},{"className":516},[391],[518],{"type":22,"value":309},{"type":16,"tag":269,"props":520,"children":522},{"className":521},[358],[523],{"type":22,"value":315},{"type":16,"tag":269,"props":525,"children":527},{"className":526},[402],[528],{"type":22,"value":321},{"type":16,"tag":269,"props":530,"children":532},{"className":531,"style":408},[366],[],{"type":16,"tag":269,"props":534,"children":537},{"className":535,"style":536},[358,359],"margin-right:0.0572em;",[538],{"type":22,"value":465},{"type":16,"tag":269,"props":540,"children":542},{"className":541},[418],[543],{"type":22,"value":331},{"type":22,"value":545},"，例如 ",{"type":16,"tag":47,"props":547,"children":549},{"className":548},[],[550],{"type":22,"value":551},"idxrf = a_rf*y + b_rf*x + c_rf0",{"type":22,"value":553},"；其中 ",{"type":16,"tag":47,"props":555,"children":557},{"className":556},[],[558],{"type":22,"value":559},"c_rf0",{"type":22,"value":561}," 由微操作字段给出，并执行 ",{"type":16,"tag":47,"props":563,"children":565},{"className":564},[],[566],{"type":22,"value":567},"rf[idxrf] += GEVM(act[idxact], par[idxpar])",{"type":22,"value":569},"。",{"type":16,"tag":100,"props":571,"children":572},{},[573],{"type":16,"tag":39,"props":574,"children":575},{},[576],{"type":22,"value":577},"(c) 最大池化、批归一化和激活：",{"type":16,"tag":247,"props":579,"children":582},{"className":580,"code":581,"language":22,"meta":252},[250],"\u002F\u002F 最大池化\nrf[idxdst0] = MAX(rf[idxdst0], rf[idxsrc0])\nrf[idxdst1] = MAX(rf[idxdst1], rf[idxsrc1])\n\n\u002F\u002F 批归一化（示意）\nrf[idxdstm]   = MUL(rf[idxdstm],   rf[idxsrcm])\nrf[idxdstm+1] = ADD(rf[idxdstm+1], rf[idxsrcm+1])\nrf[idxdstm+2] = MUL(rf[idxdstm+2], rf[idxsrcm+2])\nrf[idxdstm+3] = ADD(rf[idxdstm+3], rf[idxsrcm+3])\n\n\u002F\u002F 激活\nrf[idxdstn-1] = RELU(rf[idxdstn-1], rf[idxsrcn-1])\nrf[idxdstn]   = RELU(rf[idxdstn],   rf[idxsrcn])\n",[583],{"type":16,"tag":47,"props":584,"children":585},{"__ignoreMap":252},[586],{"type":22,"value":581},{"type":16,"tag":24,"props":588,"children":590},{"id":589},"第-7-页目标让深度学习无处不在",[591],{"type":22,"value":592},"第 7 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":594,"children":595},{},[596],{"type":16,"tag":104,"props":597,"children":600},{"alt":598,"src":599,"width":108,"height":109},"TVM 原始幻灯片第 7 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-007.webp",[],{"type":16,"tag":100,"props":602,"children":603},{},[604,609],{"type":16,"tag":39,"props":605,"children":606},{},[607],{"type":22,"value":608},"框架（Frameworks）",{"type":22,"value":610},"。本页开始讨论将深度学习部署到各种设备的目标。",{"type":16,"tag":24,"props":612,"children":614},{"id":613},"第-8-页目标让深度学习无处不在",[615],{"type":22,"value":616},"第 8 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":618,"children":619},{},[620],{"type":16,"tag":104,"props":621,"children":624},{"alt":622,"src":623,"width":108,"height":109},"TVM 原始幻灯片第 8 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-008.webp",[],{"type":16,"tag":100,"props":626,"children":627},{},[628,633],{"type":16,"tag":39,"props":629,"children":630},{},[631],{"type":22,"value":632},"模型和框架的爆炸式增长（Explosion of models and frameworks）。",{"type":22,"value":634}," 随着网络结构和软件框架不断增加，手工适配成本迅速上升。",{"type":16,"tag":24,"props":636,"children":638},{"id":637},"第-9-页目标让深度学习无处不在",[639],{"type":22,"value":640},"第 9 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":642,"children":643},{},[644],{"type":16,"tag":104,"props":645,"children":648},{"alt":646,"src":647,"width":108,"height":109},"TVM 原始幻灯片第 9 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-009.webp",[],{"type":16,"tag":100,"props":650,"children":651},{},[652,654,659],{"type":22,"value":653},"在模型\u002F框架爆炸之外，又出现了",{"type":16,"tag":39,"props":655,"children":656},{},[657],{"type":22,"value":658},"硬件后端的爆炸式增长（Explosion of hardware backends）",{"type":22,"value":569},{"type":16,"tag":24,"props":661,"children":663},{"id":662},"第-10-页目标让深度学习无处不在",[664],{"type":22,"value":665},"第 10 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":667,"children":668},{},[669],{"type":16,"tag":104,"props":670,"children":673},{"alt":671,"src":672,"width":108,"height":109},"TVM 原始幻灯片第 10 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-010.webp",[],{"type":16,"tag":100,"props":675,"children":676},{},[677],{"type":22,"value":678},"动画构建页：继续显示“模型和框架的爆炸式增长”与“硬件后端的爆炸式增长”。图中逐步增加不同后端\u002F加速器，强调组合数量持续增长。",{"type":16,"tag":24,"props":680,"children":682},{"id":681},"第-11-页目标让深度学习无处不在",[683],{"type":22,"value":684},"第 11 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":686,"children":687},{},[688],{"type":16,"tag":104,"props":689,"children":692},{"alt":690,"src":691,"width":108,"height":109},"TVM 原始幻灯片第 11 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-011.webp",[],{"type":16,"tag":100,"props":694,"children":695},{},[696],{"type":22,"value":678},{"type":16,"tag":24,"props":698,"children":700},{"id":699},"第-12-页目标让深度学习无处不在",[701],{"type":22,"value":702},"第 12 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":704,"children":705},{},[706],{"type":16,"tag":104,"props":707,"children":710},{"alt":708,"src":709,"width":108,"height":109},"TVM 原始幻灯片第 12 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-012.webp",[],{"type":16,"tag":100,"props":712,"children":713},{},[714],{"type":22,"value":678},{"type":16,"tag":24,"props":716,"children":718},{"id":717},"第-13-页目标让深度学习无处不在",[719],{"type":22,"value":720},"第 13 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":722,"children":723},{},[724],{"type":16,"tag":104,"props":725,"children":728},{"alt":726,"src":727,"width":108,"height":109},"TVM 原始幻灯片第 13 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-013.webp",[],{"type":16,"tag":100,"props":730,"children":731},{},[732],{"type":22,"value":678},{"type":16,"tag":24,"props":734,"children":736},{"id":735},"第-14-页目标让深度学习无处不在",[737],{"type":22,"value":738},"第 14 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":740,"children":741},{},[742],{"type":16,"tag":104,"props":743,"children":746},{"alt":744,"src":745,"width":108,"height":109},"TVM 原始幻灯片第 14 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-014.webp",[],{"type":16,"tag":100,"props":748,"children":749},{},[750],{"type":22,"value":678},{"type":16,"tag":24,"props":752,"children":754},{"id":753},"第-15-页目标让深度学习无处不在",[755],{"type":22,"value":756},"第 15 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":758,"children":759},{},[760],{"type":16,"tag":104,"props":761,"children":764},{"alt":762,"src":763,"width":108,"height":109},"TVM 原始幻灯片第 15 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-015.webp",[],{"type":16,"tag":100,"props":766,"children":767},{},[768],{"type":22,"value":678},{"type":16,"tag":24,"props":770,"children":772},{"id":771},"第-16-页目标让深度学习无处不在",[773],{"type":22,"value":774},"第 16 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":776,"children":777},{},[778],{"type":16,"tag":104,"props":779,"children":782},{"alt":780,"src":781,"width":108,"height":109},"TVM 原始幻灯片第 16 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-016.webp",[],{"type":16,"tag":100,"props":784,"children":785},{},[786],{"type":22,"value":678},{"type":16,"tag":24,"props":788,"children":790},{"id":789},"第-17-页目标让深度学习无处不在",[791],{"type":22,"value":792},"第 17 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":794,"children":795},{},[796],{"type":16,"tag":104,"props":797,"children":800},{"alt":798,"src":799,"width":108,"height":109},"TVM 原始幻灯片第 17 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-017.webp",[],{"type":16,"tag":100,"props":802,"children":803},{},[804],{"type":22,"value":805},"页面同时列出：",{"type":16,"tag":31,"props":807,"children":808},{},[809,814,819],{"type":16,"tag":35,"props":810,"children":811},{},[812],{"type":22,"value":813},"模型和框架的爆炸式增长；",{"type":16,"tag":35,"props":815,"children":816},{},[817],{"type":22,"value":818},"硬件后端的爆炸式增长；",{"type":16,"tag":35,"props":820,"children":821},{},[822],{"type":22,"value":823},"加速器（Accelerator）。",{"type":16,"tag":24,"props":825,"children":827},{"id":826},"第-18-页目标让深度学习无处不在",[828],{"type":22,"value":829},"第 18 页｜目标：让深度学习无处不在",{"type":16,"tag":100,"props":831,"children":832},{},[833],{"type":16,"tag":104,"props":834,"children":837},{"alt":835,"src":836,"width":108,"height":109},"TVM 原始幻灯片第 18 页：目标：让深度学习无处不在","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-018.webp",[],{"type":16,"tag":100,"props":839,"children":840},{},[841,843,848],{"type":22,"value":842},"页面明确指出：模型\u002F框架与硬件后端之间存在",{"type":16,"tag":39,"props":844,"children":845},{},[846],{"type":22,"value":847},"巨大鸿沟（Huge gap between model\u002Fframeworks and hardware backends）",{"type":22,"value":569},{"type":16,"tag":24,"props":850,"children":852},{"id":851},"第-19-页现有方法",[853],{"type":22,"value":854},"第 19 页｜现有方法",{"type":16,"tag":100,"props":856,"children":857},{},[858],{"type":16,"tag":104,"props":859,"children":862},{"alt":860,"src":861,"width":108,"height":109},"TVM 原始幻灯片第 19 页：现有方法","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-019.webp",[],{"type":16,"tag":100,"props":864,"children":865},{},[866],{"type":22,"value":867},"框架（Frameworks）与硬件（Hardware）之间需要衔接。",{"type":16,"tag":24,"props":869,"children":871},{"id":870},"第-20-页现有方法高层数据流图",[872],{"type":22,"value":873},"第 20 页｜现有方法：高层数据流图",{"type":16,"tag":100,"props":875,"children":876},{},[877],{"type":16,"tag":104,"props":878,"children":881},{"alt":879,"src":880,"width":108,"height":109},"TVM 原始幻灯片第 20 页：现有方法：高层数据流图","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-020.webp",[],{"type":16,"tag":100,"props":883,"children":884},{},[885,887,892],{"type":22,"value":886},"框架生成",{"type":16,"tag":39,"props":888,"children":889},{},[890],{"type":22,"value":891},"高层数据流图（High-level data flow graph）",{"type":22,"value":893},"，再交给硬件侧执行。",{"type":16,"tag":24,"props":895,"children":897},{"id":896},"第-21-页现有方法原语张量算子",[898],{"type":22,"value":899},"第 21 页｜现有方法：原语张量算子",{"type":16,"tag":100,"props":901,"children":902},{},[903],{"type":16,"tag":104,"props":904,"children":907},{"alt":905,"src":906,"width":108,"height":109},"TVM 原始幻灯片第 21 页：现有方法：原语张量算子","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-021.webp",[],{"type":16,"tag":100,"props":909,"children":910},{},[911,913,919,921,926],{"type":22,"value":912},"高层图由诸如 ",{"type":16,"tag":47,"props":914,"children":916},{"className":915},[],[917],{"type":22,"value":918},"Conv2D",{"type":22,"value":920}," 的",{"type":16,"tag":39,"props":922,"children":923},{},[924],{"type":22,"value":925},"原语张量算子（Primitive Tensor operators）",{"type":22,"value":927},"组成。",{"type":16,"tag":24,"props":929,"children":931},{"id":930},"第-22-页现有方法调用优化算子库",[932],{"type":22,"value":933},"第 22 页｜现有方法：调用优化算子库",{"type":16,"tag":100,"props":935,"children":936},{},[937],{"type":16,"tag":104,"props":938,"children":941},{"alt":939,"src":940,"width":108,"height":109},"TVM 原始幻灯片第 22 页：现有方法：调用优化算子库","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-022.webp",[],{"type":16,"tag":100,"props":943,"children":944},{},[945,947,953],{"type":22,"value":946},"示例：",{"type":16,"tag":47,"props":948,"children":950},{"className":949},[],[951],{"type":22,"value":952},"cuDNN",{"type":22,"value":954},"。将算子卸载（offload）到高度优化的 DNN 算子库。",{"type":16,"tag":100,"props":956,"children":957},{},[958],{"type":22,"value":959},"这种方法依赖为每个硬件平台预先手工实现和调优算子。",{"type":16,"tag":24,"props":961,"children":963},{"id":962},"第-23-页现有方法工程化优化张量算子",[964],{"type":22,"value":965},"第 23 页｜现有方法：工程化优化张量算子",{"type":16,"tag":100,"props":967,"children":968},{},[969],{"type":16,"tag":104,"props":970,"children":973},{"alt":971,"src":972,"width":108,"height":109},"TVM 原始幻灯片第 23 页：现有方法：工程化优化张量算子","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-023.webp",[],{"type":16,"tag":100,"props":975,"children":976},{},[977],{"type":22,"value":978},"章节标题：通过工程手段为张量算子编写优化实现。",{"type":16,"tag":24,"props":980,"children":982},{"id":981},"第-24-页现有方法工程化优化张量算子",[983],{"type":22,"value":984},"第 24 页｜现有方法：工程化优化张量算子",{"type":16,"tag":100,"props":986,"children":987},{},[988],{"type":16,"tag":104,"props":989,"children":992},{"alt":990,"src":991,"width":108,"height":109},"TVM 原始幻灯片第 24 页：现有方法：工程化优化张量算子","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-024.webp",[],{"type":16,"tag":100,"props":994,"children":995},{},[996],{"type":22,"value":997},"动画构建页，继续展示“工程化优化张量算子”的流程。",{"type":16,"tag":24,"props":999,"children":1001},{"id":1000},"第-25-页矩阵乘算子规格",[1002],{"type":22,"value":1003},"第 25 页｜矩阵乘：算子规格",{"type":16,"tag":100,"props":1005,"children":1006},{},[1007],{"type":16,"tag":104,"props":1008,"children":1011},{"alt":1009,"src":1010,"width":108,"height":109},"TVM 原始幻灯片第 25 页：矩阵乘：算子规格","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-025.webp",[],{"type":16,"tag":100,"props":1013,"children":1014},{},[1015,1020],{"type":16,"tag":39,"props":1016,"children":1017},{},[1018],{"type":22,"value":1019},"Matmul：算子规格（Operator Specification）",{"type":22,"value":569},{"type":16,"tag":247,"props":1022,"children":1027},{"className":1023,"code":1024,"language":1025,"meta":252,"style":1026},"language-python","C = tvm.compute((m, n),\n    lambda y, x: tvm.sum(A[k, y] * B[k, x], axis=k))\n","python","undefined",[1028],{"type":16,"tag":47,"props":1029,"children":1030},{"__ignoreMap":252},[1031],{"type":22,"value":1024},{"type":16,"tag":100,"props":1033,"children":1034},{},[1035,1037,1043,1045,1051,1052,1058,1060,1066],{"type":22,"value":1036},"该声明描述输出张量 ",{"type":16,"tag":47,"props":1038,"children":1040},{"className":1039},[],[1041],{"type":22,"value":1042},"C[y,x]",{"type":22,"value":1044}," 沿归约轴 ",{"type":16,"tag":47,"props":1046,"children":1048},{"className":1047},[],[1049],{"type":22,"value":1050},"k",{"type":22,"value":267},{"type":16,"tag":47,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":22,"value":1057},"A[k,y]",{"type":22,"value":1059}," 与 ",{"type":16,"tag":47,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":22,"value":1065},"B[k,x]",{"type":22,"value":1067}," 求和。",{"type":16,"tag":24,"props":1069,"children":1071},{"id":1070},"第-26-页矩阵乘算子规格",[1072],{"type":22,"value":1073},"第 26 页｜矩阵乘：算子规格",{"type":16,"tag":100,"props":1075,"children":1076},{},[1077],{"type":16,"tag":104,"props":1078,"children":1081},{"alt":1079,"src":1080,"width":108,"height":109},"TVM 原始幻灯片第 26 页：矩阵乘：算子规格","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-026.webp",[],{"type":16,"tag":100,"props":1083,"children":1084},{},[1085],{"type":22,"value":1086},"动画构建页：重复显示矩阵乘规格，强调规格与具体实现策略相互独立。",{"type":16,"tag":247,"props":1088,"children":1089},{"className":1023,"code":1024,"language":1025,"meta":252,"style":1026},[1090],{"type":16,"tag":47,"props":1091,"children":1092},{"__ignoreMap":252},[1093],{"type":22,"value":1024},{"type":16,"tag":24,"props":1095,"children":1097},{"id":1096},"第-27-页矩阵乘朴素代码",[1098],{"type":22,"value":1099},"第 27 页｜矩阵乘：朴素代码",{"type":16,"tag":100,"props":1101,"children":1102},{},[1103],{"type":16,"tag":104,"props":1104,"children":1107},{"alt":1105,"src":1106,"width":108,"height":109},"TVM 原始幻灯片第 27 页：矩阵乘：朴素代码","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-027.webp",[],{"type":16,"tag":100,"props":1109,"children":1110},{},[1111],{"type":16,"tag":39,"props":1112,"children":1113},{},[1114],{"type":22,"value":1115},"朴素实现（Vanilla Code）：",{"type":16,"tag":247,"props":1117,"children":1119},{"className":1023,"code":1118,"language":1025,"meta":252,"style":1026},"for y in range(1024):\n  for x in range(1024):\n    C[y][x] = 0\n    for k in range(1024):\n      C[y][x] += A[k][y] * B[k][x]\n",[1120],{"type":16,"tag":47,"props":1121,"children":1122},{"__ignoreMap":252},[1123],{"type":22,"value":1118},{"type":16,"tag":100,"props":1125,"children":1126},{},[1127],{"type":22,"value":1128},"这是规格的直接三重循环实现，没有利用局部性或专用硬件。",{"type":16,"tag":24,"props":1130,"children":1132},{"id":1131},"第-28-页矩阵乘循环分块提升局部性",[1133],{"type":22,"value":1134},"第 28 页｜矩阵乘：循环分块提升局部性",{"type":16,"tag":100,"props":1136,"children":1137},{},[1138],{"type":16,"tag":104,"props":1139,"children":1142},{"alt":1140,"src":1141,"width":108,"height":109},"TVM 原始幻灯片第 28 页：矩阵乘：循环分块提升局部性","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-028.webp",[],{"type":16,"tag":100,"props":1144,"children":1145},{},[1146],{"type":16,"tag":39,"props":1147,"children":1148},{},[1149],{"type":22,"value":1150},"循环分块（Loop Tiling for Locality）：",{"type":16,"tag":247,"props":1152,"children":1154},{"className":1023,"code":1153,"language":1025,"meta":252,"style":1026},"for yo in range(128):\n  for xo in range(128):\n    C[yo*8:yo*8+8][xo*8:xo*8+8] = 0\n    for ko in range(128):\n      for yi in range(8):\n        for xi in range(8):\n          for ki in range(8):\n            C[yo*8+yi][xo*8+xi] += \\\n              A[ko*8+ki][yo*8+yi] * B[ko*8+ki][xo*8+xi]\n",[1155],{"type":16,"tag":47,"props":1156,"children":1157},{"__ignoreMap":252},[1158],{"type":22,"value":1153},{"type":16,"tag":100,"props":1160,"children":1161},{},[1162],{"type":22,"value":1163},"把 1024×1024 的循环切成 8×8 tile，使数据可在缓存\u002F片上存储中复用。",{"type":16,"tag":24,"props":1165,"children":1167},{"id":1166},"第-29-页矩阵乘映射到加速器",[1168],{"type":22,"value":1169},"第 29 页｜矩阵乘：映射到加速器",{"type":16,"tag":100,"props":1171,"children":1172},{},[1173],{"type":16,"tag":104,"props":1174,"children":1177},{"alt":1175,"src":1176,"width":108,"height":109},"TVM 原始幻灯片第 29 页：矩阵乘：映射到加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-029.webp",[],{"type":16,"tag":100,"props":1179,"children":1180},{},[1181],{"type":16,"tag":39,"props":1182,"children":1183},{},[1184],{"type":22,"value":1185},"映射到加速器（Map to Accelerators）：",{"type":16,"tag":247,"props":1187,"children":1189},{"className":1023,"code":1188,"language":1025,"meta":252,"style":1026},"inp_buffer AL[8][8], BL[8][8]\nacc_buffer CL[8][8]\nfor yo in range(128):\n  for xo in range(128):\n    vdla.fill_zero(CL)\n    for ko in range(128):\n      vdla.dma_copy2d(AL, A[ko*8:ko*8+8][yo*8:yo*8+8])\n      vdla.dma_copy2d(BL, B[ko*8:ko*8+8][xo*8:xo*8+8])\n      vdla.fused_gemm8x8_add(CL, AL, BL)\n    vdla.dma_copy2d(C[yo*8:yo*8+8, xo*8:xo*8+8], CL)\n",[1190],{"type":16,"tag":47,"props":1191,"children":1192},{"__ignoreMap":252},[1193],{"type":22,"value":1188},{"type":16,"tag":100,"props":1195,"children":1196},{},[1197,1199,1204],{"type":22,"value":1198},"这里使用 DMA 复制、8×8 融合 GEMM 和累加缓冲区。页脚指出：优化代码需要",{"type":16,"tag":39,"props":1200,"children":1201},{},[1202],{"type":22,"value":1203},"人工探索（Human exploration of optimized code）",{"type":22,"value":569},{"type":16,"tag":24,"props":1206,"children":1208},{"id":1207},"第-30-页现有方法的局限",[1209],{"type":22,"value":1210},"第 30 页｜现有方法的局限",{"type":16,"tag":100,"props":1212,"children":1213},{},[1214],{"type":16,"tag":104,"props":1215,"children":1218},{"alt":1216,"src":1217,"width":108,"height":109},"TVM 原始幻灯片第 30 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-030.webp",[],{"type":16,"tag":100,"props":1220,"children":1221},{},[1222,1224,1229],{"type":22,"value":1223},"框架侧调用 ",{"type":16,"tag":47,"props":1225,"children":1227},{"className":1226},[],[1228],{"type":22,"value":952},{"type":22,"value":1230}," 等库。页面开始展示现有方法的问题。",{"type":16,"tag":24,"props":1232,"children":1234},{"id":1233},"第-31-页现有方法的局限",[1235],{"type":22,"value":1236},"第 31 页｜现有方法的局限",{"type":16,"tag":100,"props":1238,"children":1239},{},[1240],{"type":16,"tag":104,"props":1241,"children":1244},{"alt":1242,"src":1243,"width":108,"height":109},"TVM 原始幻灯片第 31 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-031.webp",[],{"type":16,"tag":100,"props":1246,"children":1247},{},[1248,1250,1255],{"type":22,"value":1249},"动画构建页（第 31 页）：继续显示框架到 ",{"type":16,"tag":47,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":22,"value":952},{"type":22,"value":1256}," 的调用路径，说明现有方案依赖预先工程化的库算子。",{"type":16,"tag":24,"props":1258,"children":1260},{"id":1259},"第-32-页现有方法的局限",[1261],{"type":22,"value":1262},"第 32 页｜现有方法的局限",{"type":16,"tag":100,"props":1264,"children":1265},{},[1266],{"type":16,"tag":104,"props":1267,"children":1270},{"alt":1268,"src":1269,"width":108,"height":109},"TVM 原始幻灯片第 32 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-032.webp",[],{"type":16,"tag":100,"props":1272,"children":1273},{},[1274,1276,1281],{"type":22,"value":1275},"动画构建页（第 32 页）：继续显示框架到 ",{"type":16,"tag":47,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":22,"value":952},{"type":22,"value":1256},{"type":16,"tag":24,"props":1283,"children":1285},{"id":1284},"第-33-页现有方法的局限",[1286],{"type":22,"value":1287},"第 33 页｜现有方法的局限",{"type":16,"tag":100,"props":1289,"children":1290},{},[1291],{"type":16,"tag":104,"props":1292,"children":1295},{"alt":1293,"src":1294,"width":108,"height":109},"TVM 原始幻灯片第 33 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-033.webp",[],{"type":16,"tag":100,"props":1297,"children":1298},{},[1299,1301,1306],{"type":22,"value":1300},"动画构建页（第 33 页）：继续显示框架到 ",{"type":16,"tag":47,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":22,"value":952},{"type":22,"value":1256},{"type":16,"tag":24,"props":1308,"children":1310},{"id":1309},"第-34-页现有方法的局限",[1311],{"type":22,"value":1312},"第 34 页｜现有方法的局限",{"type":16,"tag":100,"props":1314,"children":1315},{},[1316],{"type":16,"tag":104,"props":1317,"children":1320},{"alt":1318,"src":1319,"width":108,"height":109},"TVM 原始幻灯片第 34 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-034.webp",[],{"type":16,"tag":100,"props":1322,"children":1323},{},[1324,1326,1331],{"type":22,"value":1325},"动画构建页（第 34 页）：继续显示框架到 ",{"type":16,"tag":47,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":22,"value":952},{"type":22,"value":1256},{"type":16,"tag":24,"props":1333,"children":1335},{"id":1334},"第-35-页现有方法的局限",[1336],{"type":22,"value":1337},"第 35 页｜现有方法的局限",{"type":16,"tag":100,"props":1339,"children":1340},{},[1341],{"type":16,"tag":104,"props":1342,"children":1345},{"alt":1343,"src":1344,"width":108,"height":109},"TVM 原始幻灯片第 35 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-035.webp",[],{"type":16,"tag":100,"props":1347,"children":1348},{},[1349,1351,1356,1358,1363],{"type":22,"value":1350},"新增说明：",{"type":16,"tag":39,"props":1352,"children":1353},{},[1354],{"type":22,"value":1355},"算子融合优化引入了新算子（New operator introduced by operator fusion optimization）",{"type":22,"value":1357},"，理论上可能带来 ",{"type":16,"tag":39,"props":1359,"children":1360},{},[1361],{"type":22,"value":1362},"1.5 倍加速（potentially benefit: 1.5x speedup）",{"type":22,"value":569},{"type":16,"tag":24,"props":1365,"children":1367},{"id":1366},"第-36-页现有方法的局限",[1368],{"type":22,"value":1369},"第 36 页｜现有方法的局限",{"type":16,"tag":100,"props":1371,"children":1372},{},[1373],{"type":16,"tag":104,"props":1374,"children":1377},{"alt":1375,"src":1376,"width":108,"height":109},"TVM 原始幻灯片第 36 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-036.webp",[],{"type":16,"tag":100,"props":1379,"children":1380},{},[1381,1382,1386,1387,1391],{"type":22,"value":1350},{"type":16,"tag":39,"props":1383,"children":1384},{},[1385],{"type":22,"value":1355},{"type":22,"value":1357},{"type":16,"tag":39,"props":1388,"children":1389},{},[1390],{"type":22,"value":1362},{"type":22,"value":569},{"type":16,"tag":24,"props":1393,"children":1395},{"id":1394},"第-37-页现有方法的局限",[1396],{"type":22,"value":1397},"第 37 页｜现有方法的局限",{"type":16,"tag":100,"props":1399,"children":1400},{},[1401],{"type":16,"tag":104,"props":1402,"children":1405},{"alt":1403,"src":1404,"width":108,"height":109},"TVM 原始幻灯片第 37 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-037.webp",[],{"type":16,"tag":100,"props":1407,"children":1408},{},[1409,1410,1414,1415,1419],{"type":22,"value":1350},{"type":16,"tag":39,"props":1411,"children":1412},{},[1413],{"type":22,"value":1355},{"type":22,"value":1357},{"type":16,"tag":39,"props":1416,"children":1417},{},[1418],{"type":22,"value":1362},{"type":22,"value":569},{"type":16,"tag":24,"props":1421,"children":1423},{"id":1422},"第-38-页现有方法的局限",[1424],{"type":22,"value":1425},"第 38 页｜现有方法的局限",{"type":16,"tag":100,"props":1427,"children":1428},{},[1429],{"type":16,"tag":104,"props":1430,"children":1433},{"alt":1431,"src":1432,"width":108,"height":109},"TVM 原始幻灯片第 38 页：现有方法的局限","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-038.webp",[],{"type":16,"tag":100,"props":1435,"children":1436},{},[1437,1439,1444],{"type":22,"value":1438},"算子融合可能获得 1.5 倍加速，但页面强调：",{"type":16,"tag":39,"props":1440,"children":1441},{},[1442],{"type":22,"value":1443},"工程工作量很大（Engineering intensive）",{"type":22,"value":1445},"。每种模型、形状、硬件组合都可能需要新的手工实现。",{"type":16,"tag":24,"props":1447,"children":1449},{"id":1448},"第-39-页基于学习的学习系统",[1450],{"type":22,"value":1451},"第 39 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1453,"children":1454},{},[1455],{"type":16,"tag":104,"props":1456,"children":1459},{"alt":1457,"src":1458,"width":108,"height":109},"TVM 原始幻灯片第 39 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-039.webp",[],{"type":16,"tag":100,"props":1461,"children":1462},{},[1463,1465,1470],{"type":22,"value":1464},"框架提供",{"type":16,"tag":39,"props":1466,"children":1467},{},[1468],{"type":22,"value":1469},"高层数据流图和优化（High-level data flow graph and optimizations）",{"type":22,"value":1471},"，硬件执行优化后的程序。",{"type":16,"tag":24,"props":1473,"children":1475},{"id":1474},"第-40-页基于学习的学习系统",[1476],{"type":22,"value":1477},"第 40 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1479,"children":1480},{},[1481],{"type":16,"tag":104,"props":1482,"children":1485},{"alt":1483,"src":1484,"width":108,"height":109},"TVM 原始幻灯片第 40 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-040.webp",[],{"type":16,"tag":100,"props":1487,"children":1488},{},[1489],{"type":22,"value":1490},"动画构建页：继续显示高层图优化与硬件之间的连接。",{"type":16,"tag":24,"props":1492,"children":1494},{"id":1493},"第-41-页基于学习的学习系统",[1495],{"type":22,"value":1496},"第 41 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1498,"children":1499},{},[1500],{"type":16,"tag":104,"props":1501,"children":1504},{"alt":1502,"src":1503,"width":108,"height":109},"TVM 原始幻灯片第 41 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-041.webp",[],{"type":16,"tag":100,"props":1506,"children":1507},{},[1508,1510,1515],{"type":22,"value":1509},"加入",{"type":16,"tag":39,"props":1511,"children":1512},{},[1513],{"type":22,"value":1514},"面向硬件的优化张量程序搜索空间（Hardware-aware Search Space of Optimized Tensor Programs）",{"type":22,"value":569},{"type":16,"tag":24,"props":1517,"children":1519},{"id":1518},"第-42-页基于学习的学习系统",[1520],{"type":22,"value":1521},"第 42 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1523,"children":1524},{},[1525],{"type":16,"tag":104,"props":1526,"children":1529},{"alt":1527,"src":1528,"width":108,"height":109},"TVM 原始幻灯片第 42 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-042.webp",[],{"type":16,"tag":100,"props":1531,"children":1532},{},[1533,1534,1539],{"type":22,"value":1509},{"type":16,"tag":39,"props":1535,"children":1536},{},[1537],{"type":22,"value":1538},"基于机器学习的程序优化器（Machine Learning based Program Optimizer）",{"type":22,"value":569},{"type":16,"tag":24,"props":1541,"children":1543},{"id":1542},"第-43-页基于学习的学习系统",[1544],{"type":22,"value":1545},"第 43 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1547,"children":1548},{},[1549],{"type":16,"tag":104,"props":1550,"children":1553},{"alt":1551,"src":1552,"width":108,"height":109},"TVM 原始幻灯片第 43 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-043.webp",[],{"type":16,"tag":100,"props":1555,"children":1556},{},[1557],{"type":22,"value":1558},"学习型优化器可以针对新的算子工作负载和新硬件，直接生成优化程序（directly generate optimized program for new operator workloads and hardware）。",{"type":16,"tag":24,"props":1560,"children":1562},{"id":1561},"第-44-页基于学习的学习系统",[1563],{"type":22,"value":1564},"第 44 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1566,"children":1567},{},[1568],{"type":16,"tag":104,"props":1569,"children":1572},{"alt":1570,"src":1571,"width":108,"height":109},"TVM 原始幻灯片第 44 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-044.webp",[],{"type":16,"tag":100,"props":1574,"children":1575},{},[1576],{"type":22,"value":1577},"动画构建页：完整流程为“框架 → 高层数据流图与优化 → 面向硬件的搜索空间 → 机器学习程序优化器 → 硬件”。",{"type":16,"tag":24,"props":1579,"children":1581},{"id":1580},"第-45-页基于学习的学习系统",[1582],{"type":22,"value":1583},"第 45 页｜基于学习的学习系统",{"type":16,"tag":100,"props":1585,"children":1586},{},[1587],{"type":16,"tag":104,"props":1588,"children":1591},{"alt":1589,"src":1590,"width":108,"height":109},"TVM 原始幻灯片第 45 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-045.webp",[],{"type":16,"tag":100,"props":1593,"children":1594},{},[1595],{"type":22,"value":1596},"与第 44 页相同的完整流程，作为章节过渡页。",{"type":16,"tag":24,"props":1598,"children":1600},{"id":1599},"第-46-页面向硬件的搜索空间张量表达式语言",[1601],{"type":22,"value":1602},"第 46 页｜面向硬件的搜索空间：张量表达式语言",{"type":16,"tag":100,"props":1604,"children":1605},{},[1606],{"type":16,"tag":104,"props":1607,"children":1610},{"alt":1608,"src":1609,"width":108,"height":109},"TVM 原始幻灯片第 46 页：面向硬件的搜索空间：张量表达式语言","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-046.webp",[],{"type":16,"tag":100,"props":1612,"children":1613},{},[1614,1619],{"type":16,"tag":39,"props":1615,"children":1616},{},[1617],{"type":22,"value":1618},"张量表达式语言（Tensor Expression Language，规格层）",{"type":22,"value":1620},"描述矩阵乘：",{"type":16,"tag":247,"props":1622,"children":1623},{"className":1023,"code":1024,"language":1025,"meta":252,"style":1026},[1624],{"type":16,"tag":47,"props":1625,"children":1626},{"__ignoreMap":252},[1627],{"type":22,"value":1024},{"type":16,"tag":100,"props":1629,"children":1630},{},[1631],{"type":22,"value":1632},"下方连接到硬件，表示表达式最终要映射到具体硬件程序。",{"type":16,"tag":24,"props":1634,"children":1636},{"id":1635},"第-47-页面向硬件的搜索空间从表达式到硬件",[1637],{"type":22,"value":1638},"第 47 页｜面向硬件的搜索空间：从表达式到硬件",{"type":16,"tag":100,"props":1640,"children":1641},{},[1642],{"type":16,"tag":104,"props":1643,"children":1646},{"alt":1644,"src":1645,"width":108,"height":109},"TVM 原始幻灯片第 47 页：面向硬件的搜索空间：从表达式到硬件","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-047.webp",[],{"type":16,"tag":100,"props":1648,"children":1649},{},[1650,1652,1657],{"type":22,"value":1651},"定义从表达式到硬件程序的",{"type":16,"tag":39,"props":1653,"children":1654},{},[1655],{"type":22,"value":1656},"面向硬件映射搜索空间",{"type":22,"value":1658},"。设计基于 Halide 的“计算\u002F调度分离”（compute\u002Fschedule separation）：计算定义语义，调度选择实现方式。",{"type":16,"tag":24,"props":1660,"children":1662},{"id":1661},"第-48-页面向硬件的搜索空间cpu",[1663],{"type":22,"value":1664},"第 48 页｜面向硬件的搜索空间：CPU",{"type":16,"tag":100,"props":1666,"children":1667},{},[1668],{"type":16,"tag":104,"props":1669,"children":1672},{"alt":1670,"src":1671,"width":108,"height":109},"TVM 原始幻灯片第 48 页：面向硬件的搜索空间：CPU","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-048.webp",[],{"type":16,"tag":100,"props":1674,"children":1675},{},[1676],{"type":16,"tag":39,"props":1677,"children":1678},{},[1679],{"type":22,"value":1680},"CPU 的计算原语与内存层次：",{"type":16,"tag":31,"props":1682,"children":1683},{},[1684,1689,1694],{"type":16,"tag":35,"props":1685,"children":1686},{},[1687],{"type":22,"value":1688},"计算原语：标量（scalar）、向量（vector）；",{"type":16,"tag":35,"props":1690,"children":1691},{},[1692],{"type":22,"value":1693},"内存子系统：L1D、L1I、L2、L3，通常由硬件隐式管理（implicitly managed）；",{"type":16,"tag":35,"props":1695,"children":1696},{},[1697],{"type":22,"value":1698},"调度原语：循环变换（Loop Transformations）、缓存局部性（Cache Locality）、向量化（Vectorization）。",{"type":16,"tag":100,"props":1700,"children":1701},{},[1702],{"type":22,"value":1703},"这些原语复用了 Halide、Loopy 等先前工作的思想。",{"type":16,"tag":24,"props":1705,"children":1707},{"id":1706},"第-49-页支持多样硬件后端的挑战",[1708],{"type":22,"value":1709},"第 49 页｜支持多样硬件后端的挑战",{"type":16,"tag":100,"props":1711,"children":1712},{},[1713],{"type":16,"tag":104,"props":1714,"children":1717},{"alt":1715,"src":1716,"width":108,"height":109},"TVM 原始幻灯片第 49 页：支持多样硬件后端的挑战","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-049.webp",[],{"type":16,"tag":100,"props":1719,"children":1720},{},[1721,1723,1728],{"type":22,"value":1722},"需要同时支持 ",{"type":16,"tag":39,"props":1724,"children":1725},{},[1726],{"type":22,"value":1727},"CPU、GPU 和类似 TPU 的专用加速器",{"type":22,"value":1729},"。三类设备的计算原语、内存层次和管理方式差异很大。",{"type":16,"tag":24,"props":1731,"children":1733},{"id":1732},"第-50-页面向硬件的搜索空间gpu",[1734],{"type":22,"value":1735},"第 50 页｜面向硬件的搜索空间：GPU",{"type":16,"tag":100,"props":1737,"children":1738},{},[1739],{"type":16,"tag":104,"props":1740,"children":1743},{"alt":1741,"src":1742,"width":108,"height":109},"TVM 原始幻灯片第 50 页：面向硬件的搜索空间：GPU","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-050.webp",[],{"type":16,"tag":100,"props":1745,"children":1746},{},[1747],{"type":16,"tag":39,"props":1748,"children":1749},{},[1750],{"type":22,"value":1751},"GPU 的计算原语与内存层次：",{"type":16,"tag":31,"props":1753,"children":1754},{},[1755,1760,1765,1770,1775,1780],{"type":16,"tag":35,"props":1756,"children":1757},{},[1758],{"type":22,"value":1759},"设备级 L2；",{"type":16,"tag":35,"props":1761,"children":1762},{},[1763],{"type":22,"value":1764},"多个 SM（流式多处理器）；",{"type":16,"tag":35,"props":1766,"children":1767},{},[1768],{"type":22,"value":1769},"TX\u002FL1（纹理\u002F一级缓存）；",{"type":16,"tag":35,"props":1771,"children":1772},{},[1773],{"type":22,"value":1774},"RF（寄存器文件）；",{"type":16,"tag":35,"props":1776,"children":1777},{},[1778],{"type":22,"value":1779},"计算同时包含标量、向量和混合模式；",{"type":16,"tag":35,"props":1781,"children":1782},{},[1783],{"type":22,"value":1784},"片上资源在一定程度上由程序显式管理。",{"type":16,"tag":24,"props":1786,"children":1788},{"id":1787},"第-51-页面向硬件的搜索空间gpu",[1789],{"type":22,"value":1790},"第 51 页｜面向硬件的搜索空间：GPU",{"type":16,"tag":100,"props":1792,"children":1793},{},[1794],{"type":16,"tag":104,"props":1795,"children":1798},{"alt":1796,"src":1797,"width":108,"height":109},"TVM 原始幻灯片第 51 页：面向硬件的搜索空间：GPU","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-051.webp",[],{"type":16,"tag":100,"props":1800,"children":1801},{},[1802],{"type":22,"value":1803},"新增标注：计算核心之间可共享共享内存（Shared memory among compute cores）。",{"type":16,"tag":24,"props":1805,"children":1807},{"id":1806},"第-52-页面向硬件的搜索空间gpu",[1808],{"type":22,"value":1809},"第 52 页｜面向硬件的搜索空间：GPU",{"type":16,"tag":100,"props":1811,"children":1812},{},[1813],{"type":16,"tag":104,"props":1814,"children":1817},{"alt":1815,"src":1816,"width":108,"height":109},"TVM 原始幻灯片第 52 页：面向硬件的搜索空间：GPU","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-052.webp",[],{"type":16,"tag":100,"props":1819,"children":1820},{},[1821],{"type":22,"value":1822},"新增调度原语：使用共享内存（Use of Shared Memory）和线程协作（Thread Cooperation），以实现片上数据复用和协同计算。",{"type":16,"tag":24,"props":1824,"children":1826},{"id":1825},"第-53-页面向硬件的搜索空间类似-tpu-的专用加速器",[1827],{"type":22,"value":1828},"第 53 页｜面向硬件的搜索空间：类似 TPU 的专用加速器",{"type":16,"tag":100,"props":1830,"children":1831},{},[1832],{"type":16,"tag":104,"props":1833,"children":1836},{"alt":1834,"src":1835,"width":108,"height":109},"TVM 原始幻灯片第 53 页：面向硬件的搜索空间：类似 TPU 的专用加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-053.webp",[],{"type":16,"tag":100,"props":1838,"children":1839},{},[1840],{"type":16,"tag":39,"props":1841,"children":1842},{},[1843],{"type":22,"value":1844},"类似 TPU 的专用加速器：",{"type":16,"tag":31,"props":1846,"children":1847},{},[1848,1853,1858],{"type":16,"tag":35,"props":1849,"children":1850},{},[1851],{"type":22,"value":1852},"计算原语是张量（tensor）；",{"type":16,"tag":35,"props":1854,"children":1855},{},[1856],{"type":22,"value":1857},"内存子系统包含 FIFO、统一缓冲区（Unified Buffer）和累加器（Acc）；",{"type":16,"tag":35,"props":1859,"children":1860},{},[1861],{"type":22,"value":1862},"内存由软件显式管理（explicitly managed）。",{"type":16,"tag":24,"props":1864,"children":1866},{"id":1865},"第-54-页面向硬件的搜索空间类似-tpu-的专用加速器",[1867],{"type":22,"value":1868},"第 54 页｜面向硬件的搜索空间：类似 TPU 的专用加速器",{"type":16,"tag":100,"props":1870,"children":1871},{},[1872],{"type":16,"tag":104,"props":1873,"children":1876},{"alt":1874,"src":1875,"width":108,"height":109},"TVM 原始幻灯片第 54 页：面向硬件的搜索空间：类似 TPU 的专用加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-054.webp",[],{"type":16,"tag":100,"props":1878,"children":1879},{},[1880],{"type":22,"value":1881},"与第 53 页相同的硬件抽象，强调专用加速器的 FIFO、统一缓冲区和累加器。",{"type":16,"tag":24,"props":1883,"children":1885},{"id":1884},"第-55-页张量化挑战",[1886],{"type":22,"value":1887},"第 55 页｜张量化挑战",{"type":16,"tag":100,"props":1889,"children":1890},{},[1891],{"type":16,"tag":104,"props":1892,"children":1895},{"alt":1893,"src":1894,"width":108,"height":109},"TVM 原始幻灯片第 55 页：张量化挑战","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-055.webp",[],{"type":16,"tag":100,"props":1897,"children":1898},{},[1899],{"type":22,"value":1900},"页面只显示计算原语（Compute primitives），开始从标量到向量、张量的逐级抽象。",{"type":16,"tag":24,"props":1902,"children":1904},{"id":1903},"第-56-页张量化挑战标量",[1905],{"type":22,"value":1906},"第 56 页｜张量化挑战：标量",{"type":16,"tag":100,"props":1908,"children":1909},{},[1910],{"type":16,"tag":104,"props":1911,"children":1914},{"alt":1912,"src":1913,"width":108,"height":109},"TVM 原始幻灯片第 56 页：张量化挑战：标量","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-056.webp",[],{"type":16,"tag":100,"props":1916,"children":1917},{},[1918,1920,1925],{"type":22,"value":1919},"新增计算原语：",{"type":16,"tag":39,"props":1921,"children":1922},{},[1923],{"type":22,"value":1924},"标量（scalar）",{"type":22,"value":569},{"type":16,"tag":24,"props":1927,"children":1929},{"id":1928},"第-57-页张量化挑战向量",[1930],{"type":22,"value":1931},"第 57 页｜张量化挑战：向量",{"type":16,"tag":100,"props":1933,"children":1934},{},[1935],{"type":16,"tag":104,"props":1936,"children":1939},{"alt":1937,"src":1938,"width":108,"height":109},"TVM 原始幻灯片第 57 页：张量化挑战：向量","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-057.webp",[],{"type":16,"tag":100,"props":1941,"children":1942},{},[1943,1944,1949],{"type":22,"value":1919},{"type":16,"tag":39,"props":1945,"children":1946},{},[1947],{"type":22,"value":1948},"向量（vector）",{"type":22,"value":1950},"，形成“标量 + 向量”的层次。",{"type":16,"tag":24,"props":1952,"children":1954},{"id":1953},"第-58-页张量化挑战张量",[1955],{"type":22,"value":1956},"第 58 页｜张量化挑战：张量",{"type":16,"tag":100,"props":1958,"children":1959},{},[1960],{"type":16,"tag":104,"props":1961,"children":1964},{"alt":1962,"src":1963,"width":108,"height":109},"TVM 原始幻灯片第 58 页：张量化挑战：张量","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-058.webp",[],{"type":16,"tag":100,"props":1966,"children":1967},{},[1968,1969,1974],{"type":22,"value":1919},{"type":16,"tag":39,"props":1970,"children":1971},{},[1972],{"type":22,"value":1973},"张量（tensor）",{"type":22,"value":1975},"，形成“标量 + 向量 + 张量”的层次。",{"type":16,"tag":24,"props":1977,"children":1979},{"id":1978},"第-59-页张量化挑战声明张量指令接口",[1980],{"type":22,"value":1981},"第 59 页｜张量化挑战：声明张量指令接口",{"type":16,"tag":100,"props":1983,"children":1984},{},[1985],{"type":16,"tag":104,"props":1986,"children":1989},{"alt":1987,"src":1988,"width":108,"height":109},"TVM 原始幻灯片第 59 页：张量化挑战：声明张量指令接口","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-059.webp",[],{"type":16,"tag":100,"props":1991,"children":1992},{},[1993],{"type":22,"value":1994},"硬件设计者使用张量表达式声明张量指令的行为与降低规则。",{"type":16,"tag":247,"props":1996,"children":1998},{"className":1023,"code":1997,"language":1025,"meta":252,"style":1026},"w, x = t.placeholder((8, 8)), t.placeholder((8, 8))\nk = t.reduce_axis((0, 8))                 # 声明归约轴\ny = t.compute((8, 8), lambda i, j:\n               t.sum(w[i, k] * x[j, k], axis=k))\n\ndef gemm_intrin_lower(inputs, outputs):\n    ww_ptr = inputs[0].access_ptr(\"r\")\n    xx_ptr = inputs[1].access_ptr(\"r\")\n    zz_ptr = outputs[0].access_ptr(\"w\")\n    compute = t.hardware_intrin(\"gemm8x8\", ww_ptr, xx_ptr, zz_ptr)\n    reset = t.hardware_intrin(\"fill_zero\", zz_ptr)\n    update = t.hardware_intrin(\"fuse_gemm8x8_add\", ww_ptr, xx_ptr, zz_ptr)\n    return compute, reset, update\n\ngemm8x8 = t.decl_tensor_intrin(y.op, gemm_intrin_lower)\n",[1999],{"type":16,"tag":47,"props":2000,"children":2001},{"__ignoreMap":252},[2002],{"type":22,"value":1997},{"type":16,"tag":100,"props":2004,"children":2005},{},[2006],{"type":22,"value":2007},"右侧说明：硬件设计者声明张量指令接口；降低规则生成用于执行计算的硬件内建指令。",{"type":16,"tag":24,"props":2009,"children":2011},{"id":2010},"第-60-页张量化挑战将程序转换为张量指令",[2012],{"type":22,"value":2013},"第 60 页｜张量化挑战：将程序转换为张量指令",{"type":16,"tag":100,"props":2015,"children":2016},{},[2017],{"type":16,"tag":104,"props":2018,"children":2021},{"alt":2019,"src":2020,"width":108,"height":109},"TVM 原始幻灯片第 60 页：张量化挑战：将程序转换为张量指令","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-060.webp",[],{"type":16,"tag":100,"props":2023,"children":2024},{},[2025,2027,2032],{"type":22,"value":2026},"在第 59 页接口之上，",{"type":16,"tag":39,"props":2028,"children":2029},{},[2030],{"type":22,"value":2031},"张量化（Tensorize）",{"type":22,"value":2033},"把程序转换为使用张量指令的实现。",{"type":16,"tag":247,"props":2035,"children":2037},{"className":1023,"code":2036,"language":1025,"meta":252,"style":1026},"# 计算行为\nw, x = t.placeholder((8, 8)), t.placeholder((8, 8))\nk = t.reduce_axis((0, 8))\ny = t.compute((8, 8), lambda i, j:\n               t.sum(w[i, k] * x[j, k], axis=k))\n\n# 硬件内建：清零、计算、融合累加\ncompute = t.hardware_intrin(\"gemm8x8\", ww_ptr, xx_ptr, zz_ptr)\nreset = t.hardware_intrin(\"fill_zero\", zz_ptr)\nupdate = t.hardware_intrin(\"fuse_gemm8x8_add\", ww_ptr, xx_ptr, zz_ptr)\n",[2038],{"type":16,"tag":47,"props":2039,"children":2040},{"__ignoreMap":252},[2041],{"type":22,"value":2036},{"type":16,"tag":100,"props":2043,"children":2044},{},[2045],{"type":22,"value":2046},"图示从标量直接跳到张量，表示调度器可以把一段标量循环整体替换成张量指令。",{"type":16,"tag":24,"props":2048,"children":2050},{"id":2049},"第-61-页面向硬件的搜索空间类似-tpu-的专用加速器",[2051],{"type":22,"value":2052},"第 61 页｜面向硬件的搜索空间：类似 TPU 的专用加速器",{"type":16,"tag":100,"props":2054,"children":2055},{},[2056],{"type":16,"tag":104,"props":2057,"children":2060},{"alt":2058,"src":2059,"width":108,"height":109},"TVM 原始幻灯片第 61 页：面向硬件的搜索空间：类似 TPU 的专用加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-061.webp",[],{"type":16,"tag":100,"props":2062,"children":2063},{},[2064],{"type":22,"value":2065},"回到类似 TPU 的加速器抽象：张量计算、FIFO、统一缓冲区、累加器，以及显式内存管理。",{"type":16,"tag":24,"props":2067,"children":2069},{"id":2068},"第-62-页面向硬件的搜索空间类似-tpu-的专用加速器",[2070],{"type":22,"value":2071},"第 62 页｜面向硬件的搜索空间：类似 TPU 的专用加速器",{"type":16,"tag":100,"props":2073,"children":2074},{},[2075],{"type":16,"tag":104,"props":2076,"children":2079},{"alt":2077,"src":2078,"width":108,"height":109},"TVM 原始幻灯片第 62 页：面向硬件的搜索空间：类似 TPU 的专用加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-062.webp",[],{"type":16,"tag":100,"props":2081,"children":2082},{},[2083],{"type":22,"value":2084},"动画构建页，继续显示专用加速器的计算\u002F内存层次。",{"type":16,"tag":24,"props":2086,"children":2088},{"id":2087},"第-63-页软件支持隐藏延迟无任务流水线",[2089],{"type":22,"value":2090},"第 63 页｜软件支持隐藏延迟：无任务流水线",{"type":16,"tag":100,"props":2092,"children":2093},{},[2094],{"type":16,"tag":104,"props":2095,"children":2098},{"alt":2096,"src":2097,"width":108,"height":109},"TVM 原始幻灯片第 63 页：软件支持隐藏延迟：无任务流水线","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-063.webp",[],{"type":16,"tag":100,"props":2100,"children":2101},{},[2102],{"type":16,"tag":39,"props":2103,"children":2104},{},[2105],{"type":22,"value":2106},"单模块、无任务流水线（Single Module \u002F No Task-Pipelining）：",{"type":16,"tag":100,"props":2108,"children":2109},{},[2110],{"type":22,"value":2111},"时间线依次执行：加载输入 → 加载权重 → 矩阵乘 → 写回输出，然后重复下一模块。由于加载、计算、存储串行，内存延迟暴露在关键路径上。",{"type":16,"tag":24,"props":2113,"children":2115},{"id":2114},"第-64-页软件支持隐藏延迟任务级流水线",[2116],{"type":22,"value":2117},"第 64 页｜软件支持隐藏延迟：任务级流水线",{"type":16,"tag":100,"props":2119,"children":2120},{},[2121],{"type":16,"tag":104,"props":2122,"children":2125},{"alt":2123,"src":2124,"width":108,"height":109},"TVM 原始幻灯片第 64 页：软件支持隐藏延迟：任务级流水线","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-064.webp",[],{"type":16,"tag":100,"props":2127,"children":2128},{},[2129],{"type":16,"tag":39,"props":2130,"children":2131},{},[2132],{"type":22,"value":2133},"多模块、任务级流水线（Multiple-Module \u002F Task-Level Pipelining）：",{"type":16,"tag":100,"props":2135,"children":2136},{},[2137],{"type":22,"value":2138},"多个模块交错执行：先并行加载模块 1\u002F2 的输入和权重，再让矩阵乘阶段与下一组加载重叠，最后分别存储输出。这样可用计算工作覆盖内存访问延迟。",{"type":16,"tag":24,"props":2140,"children":2142},{"id":2141},"第-65-页软件支持隐藏延迟显式依赖跟踪",[2143],{"type":22,"value":2144},"第 65 页｜软件支持隐藏延迟：显式依赖跟踪",{"type":16,"tag":100,"props":2146,"children":2147},{},[2148],{"type":16,"tag":104,"props":2149,"children":2152},{"alt":2150,"src":2151,"width":108,"height":109},"TVM 原始幻灯片第 65 页：软件支持隐藏延迟：显式依赖跟踪","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-065.webp",[],{"type":16,"tag":100,"props":2154,"children":2155},{},[2156],{"type":22,"value":2157},"任务级流水线的依赖关系由软件显式跟踪（Explicit dependency tracking managed by software），从而隐藏内存延迟。",{"type":16,"tag":24,"props":2159,"children":2161},{"id":2160},"第-66-页面向硬件的搜索空间张量表达式语言",[2162],{"type":22,"value":2163},"第 66 页｜面向硬件的搜索空间：张量表达式语言",{"type":16,"tag":100,"props":2165,"children":2166},{},[2167],{"type":16,"tag":104,"props":2168,"children":2171},{"alt":2169,"src":2170,"width":108,"height":109},"TVM 原始幻灯片第 66 页：面向硬件的搜索空间：张量表达式语言","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-066.webp",[],{"type":16,"tag":100,"props":2173,"children":2174},{},[2175],{"type":22,"value":2176},"再次给出张量表达式规格：",{"type":16,"tag":247,"props":2178,"children":2179},{"className":1023,"code":1024,"language":1025,"meta":252,"style":1026},[2180],{"type":16,"tag":47,"props":2181,"children":2182},{"__ignoreMap":252},[2183],{"type":22,"value":1024},{"type":16,"tag":100,"props":2185,"children":2186},{},[2187],{"type":22,"value":2188},"表达式本身保持与硬件无关。",{"type":16,"tag":24,"props":2190,"children":2192},{"id":2191},"第-67-页面向硬件的搜索空间既有原语",[2193],{"type":22,"value":2194},"第 67 页｜面向硬件的搜索空间：既有原语",{"type":16,"tag":100,"props":2196,"children":2197},{},[2198],{"type":16,"tag":104,"props":2199,"children":2202},{"alt":2200,"src":2201,"width":108,"height":109},"TVM 原始幻灯片第 67 页：面向硬件的搜索空间：既有原语","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-067.webp",[],{"type":16,"tag":100,"props":2204,"children":2205},{},[2206],{"type":22,"value":2207},"先前工作（Halide、Loopy）中的原语包括：",{"type":16,"tag":31,"props":2209,"children":2210},{},[2211,2216,2221],{"type":16,"tag":35,"props":2212,"children":2213},{},[2214],{"type":22,"value":2215},"循环变换（Loop Transformations）；",{"type":16,"tag":35,"props":2217,"children":2218},{},[2219],{"type":22,"value":2220},"线程绑定（Thread Bindings）；",{"type":16,"tag":35,"props":2222,"children":2223},{},[2224],{"type":22,"value":2225},"缓存局部性（Cache Locality）。",{"type":16,"tag":24,"props":2227,"children":2229},{"id":2228},"第-68-页面向硬件的搜索空间新增-gpu加速器原语",[2230],{"type":22,"value":2231},"第 68 页｜面向硬件的搜索空间：新增 GPU\u002F加速器原语",{"type":16,"tag":100,"props":2233,"children":2234},{},[2235],{"type":16,"tag":104,"props":2236,"children":2239},{"alt":2237,"src":2238,"width":108,"height":109},"TVM 原始幻灯片第 68 页：面向硬件的搜索空间：新增 GPU\u002F加速器原语","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-068.webp",[],{"type":16,"tag":100,"props":2241,"children":2242},{},[2243],{"type":22,"value":2244},"为 GPU 和类似 TPU 的加速器加入新原语：",{"type":16,"tag":31,"props":2246,"children":2247},{},[2248,2253,2258,2263],{"type":16,"tag":35,"props":2249,"children":2250},{},[2251],{"type":22,"value":2252},"线程协作（Thread Cooperation）；",{"type":16,"tag":35,"props":2254,"children":2255},{},[2256],{"type":22,"value":2257},"张量化（Tensorization）；",{"type":16,"tag":35,"props":2259,"children":2260},{},[2261],{"type":22,"value":2262},"延迟隐藏（Latency Hiding）；",{"type":16,"tag":35,"props":2264,"children":2265},{},[2266],{"type":22,"value":2267},"以及更多原语（…）。",{"type":16,"tag":24,"props":2269,"children":2271},{"id":2270},"第-69-页面向硬件的搜索空间调度原语集合",[2272],{"type":22,"value":2273},"第 69 页｜面向硬件的搜索空间：调度原语集合",{"type":16,"tag":100,"props":2275,"children":2276},{},[2277],{"type":16,"tag":104,"props":2278,"children":2281},{"alt":2279,"src":2280,"width":108,"height":109},"TVM 原始幻灯片第 69 页：面向硬件的搜索空间：调度原语集合","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-069.webp",[],{"type":16,"tag":100,"props":2283,"children":2284},{},[2285],{"type":22,"value":2286},"完整调度原语集合包括循环变换、线程绑定、缓存局部性、线程协作、张量化和延迟隐藏。",{"type":16,"tag":24,"props":2288,"children":2290},{"id":2289},"第-70-页面向硬件的搜索空间调度原语集合",[2291],{"type":22,"value":2292},"第 70 页｜面向硬件的搜索空间：调度原语集合",{"type":16,"tag":100,"props":2294,"children":2295},{},[2296],{"type":16,"tag":104,"props":2297,"children":2300},{"alt":2298,"src":2299,"width":108,"height":109},"TVM 原始幻灯片第 70 页：面向硬件的搜索空间：调度原语集合","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-070.webp",[],{"type":16,"tag":100,"props":2302,"children":2303},{},[2304],{"type":22,"value":2305},"动画构建页：继续呈现同一组调度原语与硬件的连接。",{"type":16,"tag":24,"props":2307,"children":2309},{"id":2308},"第-71-页面向硬件的搜索空间数十亿优化选择",[2310],{"type":22,"value":2311},"第 71 页｜面向硬件的搜索空间：数十亿优化选择",{"type":16,"tag":100,"props":2313,"children":2314},{},[2315],{"type":16,"tag":104,"props":2316,"children":2319},{"alt":2317,"src":2318,"width":108,"height":109},"TVM 原始幻灯片第 71 页：面向硬件的搜索空间：数十亿优化选择","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-071.webp",[],{"type":16,"tag":100,"props":2321,"children":2322},{},[2323,2325,2330],{"type":22,"value":2324},"这些组合带来",{"type":16,"tag":39,"props":2326,"children":2327},{},[2328],{"type":22,"value":2329},"数十亿种可能的优化选择（Billions of possible optimization choices）",{"type":22,"value":2331},"，人工搜索无法扩展，因此需要学习型程序优化器。",{"type":16,"tag":24,"props":2333,"children":2335},{"id":2334},"第-72-页基于学习的学习系统",[2336],{"type":22,"value":2337},"第 72 页｜基于学习的学习系统",{"type":16,"tag":100,"props":2339,"children":2340},{},[2341],{"type":16,"tag":104,"props":2342,"children":2345},{"alt":2343,"src":2344,"width":108,"height":109},"TVM 原始幻灯片第 72 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-072.webp",[],{"type":16,"tag":100,"props":2347,"children":2348},{},[2349],{"type":22,"value":2350},"完整系统由四层构成：框架中的高层数据流图与优化、面向硬件的优化张量程序搜索空间、机器学习程序优化器，以及硬件。",{"type":16,"tag":24,"props":2352,"children":2354},{"id":2353},"第-73-页基于学习的学习系统",[2355],{"type":22,"value":2356},"第 73 页｜基于学习的学习系统",{"type":16,"tag":100,"props":2358,"children":2359},{},[2360],{"type":16,"tag":104,"props":2361,"children":2364},{"alt":2362,"src":2363,"width":108,"height":109},"TVM 原始幻灯片第 73 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-073.webp",[],{"type":16,"tag":100,"props":2366,"children":2367},{},[2368],{"type":22,"value":2369},"动画构建页，重复显示完整四层系统。",{"type":16,"tag":24,"props":2371,"children":2373},{"id":2372},"第-74-页基于学习的程序优化器",[2374],{"type":22,"value":2375},"第 74 页｜基于学习的程序优化器",{"type":16,"tag":100,"props":2377,"children":2378},{},[2379],{"type":16,"tag":104,"props":2380,"children":2383},{"alt":2381,"src":2382,"width":108,"height":109},"TVM 原始幻灯片第 74 页：基于学习的程序优化器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-074.webp",[],{"type":16,"tag":100,"props":2385,"children":2386},{},[2387],{"type":22,"value":2388},"章节标题：基于学习的程序优化器（Learning-based Program Optimizer）。",{"type":16,"tag":24,"props":2390,"children":2392},{"id":2391},"第-75-页基于学习的程序优化器程序生成",[2393],{"type":22,"value":2394},"第 75 页｜基于学习的程序优化器：程序生成",{"type":16,"tag":100,"props":2396,"children":2397},{},[2398],{"type":16,"tag":104,"props":2399,"children":2402},{"alt":2400,"src":2401,"width":108,"height":109},"TVM 原始幻灯片第 75 页：基于学习的程序优化器：程序生成","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-075.webp",[],{"type":16,"tag":100,"props":2404,"children":2405},{},[2406,2408,2413,2415,2420],{"type":22,"value":2407},"优化器接收候选",{"type":16,"tag":39,"props":2409,"children":2410},{},[2411],{"type":22,"value":2412},"程序（Program）",{"type":22,"value":2414},"，通过",{"type":16,"tag":39,"props":2416,"children":2417},{},[2418],{"type":22,"value":2419},"代码生成器（Code Generator）",{"type":22,"value":2421},"产生可执行代码。",{"type":16,"tag":24,"props":2423,"children":2425},{"id":2424},"第-76-页基于学习的程序优化器运行时测量",[2426],{"type":22,"value":2427},"第 76 页｜基于学习的程序优化器：运行时测量",{"type":16,"tag":100,"props":2429,"children":2430},{},[2431],{"type":16,"tag":104,"props":2432,"children":2435},{"alt":2433,"src":2434,"width":108,"height":109},"TVM 原始幻灯片第 76 页：基于学习的程序优化器：运行时测量","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-076.webp",[],{"type":16,"tag":100,"props":2437,"children":2438},{},[2439,2441,2446],{"type":22,"value":2440},"代码在目标硬件上运行，并收集",{"type":16,"tag":39,"props":2442,"children":2443},{},[2444],{"type":22,"value":2445},"运行时测量结果（Runtime Measurements）",{"type":22,"value":2447},"，反馈给优化器。",{"type":16,"tag":24,"props":2449,"children":2451},{"id":2450},"第-77-页基于学习的程序优化器试验成本",[2452],{"type":22,"value":2453},"第 77 页｜基于学习的程序优化器：试验成本",{"type":16,"tag":100,"props":2455,"children":2456},{},[2457],{"type":16,"tag":104,"props":2458,"children":2461},{"alt":2459,"src":2460,"width":108,"height":109},"TVM 原始幻灯片第 77 页：基于学习的程序优化器：试验成本","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-077.webp",[],{"type":16,"tag":100,"props":2463,"children":2464},{},[2465,2467,2472],{"type":22,"value":2466},"每轮试验都要生成代码并在硬件上运行。页面指出试验成本很高：",{"type":16,"tag":39,"props":2468,"children":2469},{},[2470],{"type":22,"value":2471},"每次试验约需 1 秒（each trial costs ~1 second）",{"type":22,"value":569},{"type":16,"tag":24,"props":2474,"children":2476},{"id":2475},"第-78-页基于学习的程序优化器代价模型",[2477],{"type":22,"value":2478},"第 78 页｜基于学习的程序优化器：代价模型",{"type":16,"tag":100,"props":2480,"children":2481},{},[2482],{"type":16,"tag":104,"props":2483,"children":2486},{"alt":2484,"src":2485,"width":108,"height":109},"TVM 原始幻灯片第 78 页：基于学习的程序优化器：代价模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-078.webp",[],{"type":16,"tag":100,"props":2488,"children":2489},{},[2490],{"type":22,"value":2491},"为减少真实运行次数，引入代价模型（Cost Model）。",{"type":16,"tag":24,"props":2493,"children":2495},{"id":2494},"第-79-页基于学习的程序优化器代价模型",[2496],{"type":22,"value":2497},"第 79 页｜基于学习的程序优化器：代价模型",{"type":16,"tag":100,"props":2499,"children":2500},{},[2501],{"type":16,"tag":104,"props":2502,"children":2505},{"alt":2503,"src":2504,"width":108,"height":109},"TVM 原始幻灯片第 79 页：基于学习的程序优化器：代价模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-079.webp",[],{"type":16,"tag":100,"props":2507,"children":2508},{},[2509],{"type":22,"value":2510},"代价模型用于预测候选程序性能，再由优化器选择下一组搜索点。",{"type":16,"tag":24,"props":2512,"children":2514},{"id":2513},"第-80-页基于学习的程序优化器硬件相关代价模型",[2515],{"type":22,"value":2516},"第 80 页｜基于学习的程序优化器：硬件相关代价模型",{"type":16,"tag":100,"props":2518,"children":2519},{},[2520],{"type":16,"tag":104,"props":2521,"children":2524},{"alt":2522,"src":2523,"width":108,"height":109},"TVM 原始幻灯片第 80 页：基于学习的程序优化器：硬件相关代价模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-080.webp",[],{"type":16,"tag":100,"props":2526,"children":2527},{},[2528],{"type":22,"value":2529},"页面强调：需要针对每种硬件拥有可靠的代价模型（Need reliable cost model per hardware）。",{"type":16,"tag":24,"props":2531,"children":2533},{"id":2532},"第-81-页基于学习的程序优化器学习闭环",[2534],{"type":22,"value":2535},"第 81 页｜基于学习的程序优化器：学习闭环",{"type":16,"tag":100,"props":2537,"children":2538},{},[2539],{"type":16,"tag":104,"props":2540,"children":2543},{"alt":2541,"src":2542,"width":108,"height":109},"TVM 原始幻灯片第 81 页：基于学习的程序优化器：学习闭环","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-081.webp",[],{"type":16,"tag":100,"props":2545,"children":2546},{},[2547],{"type":22,"value":2548},"动画构建页：程序优化器、代码生成器、运行时测量和代价模型形成闭环。",{"type":16,"tag":24,"props":2550,"children":2552},{"id":2551},"第-82-页基于学习的程序优化器训练数据",[2553],{"type":22,"value":2554},"第 82 页｜基于学习的程序优化器：训练数据",{"type":16,"tag":100,"props":2556,"children":2557},{},[2558],{"type":16,"tag":104,"props":2559,"children":2562},{"alt":2560,"src":2561,"width":108,"height":109},"TVM 原始幻灯片第 82 页：基于学习的程序优化器：训练数据","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-082.webp",[],{"type":16,"tag":100,"props":2564,"children":2565},{},[2566,2568,2574],{"type":22,"value":2567},"从程序在硬件上的测量结果获得训练数据（Training data），用于拟合统计代价模型。图中 ",{"type":16,"tag":47,"props":2569,"children":2571},{"className":2570},[],[2572],{"type":22,"value":2573},"D",{"type":22,"value":2575}," 表示收集的数据集。",{"type":16,"tag":24,"props":2577,"children":2579},{"id":2578},"第-83-页基于学习的程序优化器统计代价模型",[2580],{"type":22,"value":2581},"第 83 页｜基于学习的程序优化器：统计代价模型",{"type":16,"tag":100,"props":2583,"children":2584},{},[2585],{"type":16,"tag":104,"props":2586,"children":2589},{"alt":2587,"src":2588,"width":108,"height":109},"TVM 原始幻灯片第 83 页：基于学习的程序优化器：统计代价模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-083.webp",[],{"type":16,"tag":100,"props":2591,"children":2592},{},[2593,2594,2599,2601,2606],{"type":22,"value":1509},{"type":16,"tag":39,"props":2595,"children":2596},{},[2597],{"type":22,"value":2598},"学习（Learning）",{"type":22,"value":2600},"与",{"type":16,"tag":39,"props":2602,"children":2603},{},[2604],{"type":22,"value":2605},"统计代价模型（Statistical Cost Model）",{"type":22,"value":2607},"：用训练数据拟合程序特征到运行时间\u002F代价的预测函数。",{"type":16,"tag":24,"props":2609,"children":2611},{"id":2610},"第-84-页基于学习的程序优化器适配不同硬件",[2612],{"type":22,"value":2613},"第 84 页｜基于学习的程序优化器：适配不同硬件",{"type":16,"tag":100,"props":2615,"children":2616},{},[2617],{"type":16,"tag":104,"props":2618,"children":2621},{"alt":2619,"src":2620,"width":108,"height":109},"TVM 原始幻灯片第 84 页：基于学习的程序优化器：适配不同硬件","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-084.webp",[],{"type":16,"tag":100,"props":2623,"children":2624},{},[2625,2627,2632],{"type":22,"value":2626},"统计代价模型通过学习适配硬件类型（Adapt to hardware type by learning），并可在约 ",{"type":16,"tag":39,"props":2628,"children":2629},{},[2630],{"type":22,"value":2631},"1 ms 量级（Make prediction in 1ms level）",{"type":22,"value":2633},"完成预测，远快于实际运行一次程序。",{"type":16,"tag":24,"props":2635,"children":2637},{"id":2636},"第-85-页机器学习模型的有效性",[2638],{"type":22,"value":2639},"第 85 页｜机器学习模型的有效性",{"type":16,"tag":100,"props":2641,"children":2642},{},[2643],{"type":16,"tag":104,"props":2644,"children":2647},{"alt":2645,"src":2646,"width":108,"height":109},"TVM 原始幻灯片第 85 页：机器学习模型的有效性","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-085.webp",[],{"type":16,"tag":100,"props":2649,"children":2650},{},[2651],{"type":22,"value":2652},"图表逐步绘制中，纵轴范围约为 0.00–1.50，横轴为试验次数（0–800）。",{"type":16,"tag":24,"props":2654,"children":2656},{"id":2655},"第-86-页机器学习模型的有效性",[2657],{"type":22,"value":2658},"第 86 页｜机器学习模型的有效性",{"type":16,"tag":100,"props":2660,"children":2661},{},[2662],{"type":16,"tag":104,"props":2663,"children":2666},{"alt":2664,"src":2665,"width":108,"height":109},"TVM 原始幻灯片第 86 页：机器学习模型的有效性","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-086.webp",[],{"type":16,"tag":100,"props":2668,"children":2669},{},[2670,2672,2677],{"type":22,"value":2671},"实验对象标注为：",{"type":16,"tag":39,"props":2673,"children":2674},{},[2675],{"type":22,"value":2676},"Titan X 上 ResNet18 的一个 Conv2D 层（One Conv2D Layer of ResNet18 on Titan X）",{"type":22,"value":569},{"type":16,"tag":24,"props":2679,"children":2681},{"id":2680},"第-87-页机器学习模型的有效性",[2682],{"type":22,"value":2683},"第 87 页｜机器学习模型的有效性",{"type":16,"tag":100,"props":2685,"children":2686},{},[2687],{"type":16,"tag":104,"props":2688,"children":2691},{"alt":2689,"src":2690,"width":108,"height":109},"TVM 原始幻灯片第 87 页：机器学习模型的有效性","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-087.webp",[],{"type":16,"tag":100,"props":2693,"children":2694},{},[2695,2697,2702],{"type":22,"value":2696},"横轴明确为",{"type":16,"tag":39,"props":2698,"children":2699},{},[2700],{"type":22,"value":2701},"试验次数（Number of Trials）",{"type":22,"value":2703},"，纵轴为相对性能\u002F加速比。",{"type":16,"tag":24,"props":2705,"children":2707},{"id":2706},"第-88-页机器学习模型的有效性cudnn-基线",[2708],{"type":22,"value":2709},"第 88 页｜机器学习模型的有效性：cuDNN 基线",{"type":16,"tag":100,"props":2711,"children":2712},{},[2713],{"type":16,"tag":104,"props":2714,"children":2717},{"alt":2715,"src":2716,"width":108,"height":109},"TVM 原始幻灯片第 88 页：机器学习模型的有效性：cuDNN 基线","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-088.webp",[],{"type":16,"tag":100,"props":2719,"children":2720},{},[2721,2723,2728,2730,2735],{"type":22,"value":2722},"纵轴为",{"type":16,"tag":39,"props":2724,"children":2725},{},[2726],{"type":22,"value":2727},"相对加速比（Relative Speedup）",{"type":22,"value":2729},"；图例加入 ",{"type":16,"tag":39,"props":2731,"children":2732},{},[2733],{"type":22,"value":2734},"基线：cuDNN（Baseline: CuDNN）",{"type":22,"value":2736},"。实验仍是 Titan X 上 ResNet18 的一个 Conv2D 层。",{"type":16,"tag":24,"props":2738,"children":2740},{"id":2739},"第-89-页机器学习模型的有效性随机搜索",[2741],{"type":22,"value":2742},"第 89 页｜机器学习模型的有效性：随机搜索",{"type":16,"tag":100,"props":2744,"children":2745},{},[2746],{"type":16,"tag":104,"props":2747,"children":2750},{"alt":2748,"src":2749,"width":108,"height":109},"TVM 原始幻灯片第 89 页：机器学习模型的有效性：随机搜索","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-089.webp",[],{"type":16,"tag":100,"props":2752,"children":2753},{},[2754,2756,2761],{"type":22,"value":2755},"图例加入 ",{"type":16,"tag":39,"props":2757,"children":2758},{},[2759],{"type":22,"value":2760},"TVM：随机搜索（TVM: Random Search）",{"type":22,"value":2762},"，与 cuDNN 基线比较。随机搜索需要较多试验才能找到高性能程序。",{"type":16,"tag":24,"props":2764,"children":2766},{"id":2765},"第-90-页机器学习模型的有效性基于机器学习的模型",[2767],{"type":22,"value":2768},"第 90 页｜机器学习模型的有效性：基于机器学习的模型",{"type":16,"tag":100,"props":2770,"children":2771},{},[2772],{"type":16,"tag":104,"props":2773,"children":2776},{"alt":2774,"src":2775,"width":108,"height":109},"TVM 原始幻灯片第 90 页：机器学习模型的有效性：基于机器学习的模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-090.webp",[],{"type":16,"tag":100,"props":2778,"children":2779},{},[2780,2781,2786],{"type":22,"value":2755},{"type":16,"tag":39,"props":2782,"children":2783},{},[2784],{"type":22,"value":2785},"TVM：基于机器学习的模型（TVM: ML-based Model）",{"type":22,"value":2787},"。学习型代价模型比随机搜索更快接近高性能区域，并超过 cuDNN 基线。",{"type":16,"tag":24,"props":2789,"children":2791},{"id":2790},"第-91-页基于学习的学习系统",[2792],{"type":22,"value":2793},"第 91 页｜基于学习的学习系统",{"type":16,"tag":100,"props":2795,"children":2796},{},[2797],{"type":16,"tag":104,"props":2798,"children":2801},{"alt":2799,"src":2800,"width":108,"height":109},"TVM 原始幻灯片第 91 页：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-091.webp",[],{"type":16,"tag":100,"props":2803,"children":2804},{},[2805],{"type":22,"value":2806},"完整方案总结：",{"type":16,"tag":2808,"props":2809,"children":2810},"ol",{},[2811,2816,2821,2826],{"type":16,"tag":35,"props":2812,"children":2813},{},[2814],{"type":22,"value":2815},"高层数据流图和优化；",{"type":16,"tag":35,"props":2817,"children":2818},{},[2819],{"type":22,"value":2820},"面向硬件的优化张量程序搜索空间；",{"type":16,"tag":35,"props":2822,"children":2823},{},[2824],{"type":22,"value":2825},"基于机器学习的程序优化器；",{"type":16,"tag":35,"props":2827,"children":2828},{},[2829],{"type":22,"value":2830},"目标硬件。",{"type":16,"tag":24,"props":2832,"children":2834},{"id":2833},"第-92-页端到端推理性能nvidia-titan-x",[2835],{"type":22,"value":2836},"第 92 页｜端到端推理性能：NVIDIA Titan X",{"type":16,"tag":100,"props":2838,"children":2839},{},[2840],{"type":16,"tag":104,"props":2841,"children":2844},{"alt":2842,"src":2843,"width":108,"height":109},"TVM 原始幻灯片第 92 页：端到端推理性能：NVIDIA Titan X","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-092.webp",[],{"type":16,"tag":100,"props":2846,"children":2847},{},[2848],{"type":22,"value":2849},"在 NVIDIA Titan X 上比较 TensorFlow、Apache MXNet 和 TensorFlow-XLA。",{"type":16,"tag":100,"props":2851,"children":2852},{},[2853],{"type":22,"value":2854},"图表：纵轴为时间（ms）；模型横轴包括 ResNet-18、MobileNet、LSTM LM、DQN、DCGAN。",{"type":16,"tag":24,"props":2856,"children":2858},{"id":2857},"第-93-页端到端推理性能cudnn-支持",[2859],{"type":22,"value":2860},"第 93 页｜端到端推理性能：cuDNN 支持",{"type":16,"tag":100,"props":2862,"children":2863},{},[2864],{"type":16,"tag":104,"props":2865,"children":2868},{"alt":2866,"src":2867,"width":108,"height":109},"TVM 原始幻灯片第 93 页：端到端推理性能：cuDNN 支持","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-093.webp",[],{"type":16,"tag":100,"props":2870,"children":2871},{},[2872,2874,2879],{"type":22,"value":2873},"新增说明：各框架由 ",{"type":16,"tag":39,"props":2875,"children":2876},{},[2877],{"type":22,"value":2878},"cuDNN 支持（Backed by cuDNN）",{"type":22,"value":2880},"。图表比较 TensorFlow、Apache MXNet 与 TensorFlow-XLA 的端到端推理时间。",{"type":16,"tag":24,"props":2882,"children":2884},{"id":2883},"第-94-页端到端推理性能tvm无图优化",[2885],{"type":22,"value":2886},"第 94 页｜端到端推理性能：TVM（无图优化）",{"type":16,"tag":100,"props":2888,"children":2889},{},[2890],{"type":16,"tag":104,"props":2891,"children":2894},{"alt":2892,"src":2893,"width":108,"height":109},"TVM 原始幻灯片第 94 页：端到端推理性能：TVM（无图优化）","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-094.webp",[],{"type":16,"tag":100,"props":2896,"children":2897},{},[2898,2900,2905],{"type":22,"value":2899},"加入 ",{"type":16,"tag":39,"props":2901,"children":2902},{},[2903],{"type":22,"value":2904},"TVM：无图优化（TVM: without graph optimizations）",{"type":22,"value":2906},"，用于区分算子级优化与整图优化的贡献。",{"type":16,"tag":24,"props":2908,"children":2910},{"id":2909},"第-95-页端到端推理性能tvm-全部优化",[2911],{"type":22,"value":2912},"第 95 页｜端到端推理性能：TVM 全部优化",{"type":16,"tag":100,"props":2914,"children":2915},{},[2916],{"type":16,"tag":104,"props":2917,"children":2920},{"alt":2918,"src":2919,"width":108,"height":109},"TVM 原始幻灯片第 95 页：端到端推理性能：TVM 全部优化","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-095.webp",[],{"type":16,"tag":100,"props":2922,"children":2923},{},[2924,2925,2930],{"type":22,"value":2899},{"type":16,"tag":39,"props":2926,"children":2927},{},[2928],{"type":22,"value":2929},"TVM：全部优化（TVM: all optimizations）",{"type":22,"value":2931},"，即同时使用算子调优和图级优化。",{"type":16,"tag":24,"props":2933,"children":2935},{"id":2934},"第-96-页端到端推理性能标准模型",[2936],{"type":22,"value":2937},"第 96 页｜端到端推理性能：标准模型",{"type":16,"tag":100,"props":2939,"children":2940},{},[2941],{"type":16,"tag":104,"props":2942,"children":2945},{"alt":2943,"src":2944,"width":108,"height":109},"TVM 原始幻灯片第 96 页：端到端推理性能：标准模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-096.webp",[],{"type":16,"tag":100,"props":2947,"children":2948},{},[2949],{"type":22,"value":2950},"标注结论：在标准模型（standard models）上，TVM 具有竞争力（Competitive on standard models）。",{"type":16,"tag":24,"props":2952,"children":2954},{"id":2953},"第-97-页端到端推理性能非传统模型",[2955],{"type":22,"value":2956},"第 97 页｜端到端推理性能：非传统模型",{"type":16,"tag":100,"props":2958,"children":2959},{},[2960],{"type":16,"tag":104,"props":2961,"children":2964},{"alt":2962,"src":2963,"width":108,"height":109},"TVM 原始幻灯片第 97 页：端到端推理性能：非传统模型","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-097.webp",[],{"type":16,"tag":100,"props":2966,"children":2967},{},[2968],{"type":22,"value":2969},"补充结论：在不太传统的模型（less conventional models）上，TVM 与现有方案之间的性能差距更大（Bigger gap）。",{"type":16,"tag":24,"props":2971,"children":2973},{"id":2972},"第-98-页端到端性能arm-cortex-a53",[2974],{"type":22,"value":2975},"第 98 页｜端到端性能：ARM Cortex-A53",{"type":16,"tag":100,"props":2977,"children":2978},{},[2979],{"type":16,"tag":104,"props":2980,"children":2983},{"alt":2981,"src":2982,"width":108,"height":109},"TVM 原始幻灯片第 98 页：端到端性能：ARM Cortex-A53","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-098.webp",[],{"type":16,"tag":100,"props":2985,"children":2986},{},[2987],{"type":22,"value":2988},"在 ARM Cortex-A53 上比较 TensorFlow Lite、TVM（无图优化）和 TVM。",{"type":16,"tag":31,"props":2990,"children":2991},{},[2992,2997,3002],{"type":16,"tag":35,"props":2993,"children":2994},{},[2995],{"type":22,"value":2996},"模型：ResNet-18、MobileNet、DQN；",{"type":16,"tag":35,"props":2998,"children":2999},{},[3000],{"type":22,"value":3001},"纵轴：时间（ms），不同模型使用不同刻度；",{"type":16,"tag":35,"props":3003,"children":3004},{},[3005],{"type":22,"value":3006},"目标是嵌入式 ARM 平台的端到端性能。",{"type":16,"tag":24,"props":3008,"children":3010},{"id":3009},"第-99-页端到端性能arm-cortex-a53",[3011],{"type":22,"value":3012},"第 99 页｜端到端性能：ARM Cortex-A53",{"type":16,"tag":100,"props":3014,"children":3015},{},[3016],{"type":16,"tag":104,"props":3017,"children":3020},{"alt":3018,"src":3019,"width":108,"height":109},"TVM 原始幻灯片第 99 页：端到端性能：ARM Cortex-A53","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-099.webp",[],{"type":16,"tag":100,"props":3022,"children":3023},{},[3024,3026,3031],{"type":22,"value":3025},"图中注明 TensorFlow Lite ",{"type":16,"tag":39,"props":3027,"children":3028},{},[3029],{"type":22,"value":3030},"专门针对嵌入式 ARM 系统优化（Specially optimized for Embedded system (ARM)）",{"type":22,"value":3032},"，并与 TVM 的无图优化\u002F全部优化版本比较。",{"type":16,"tag":24,"props":3034,"children":3036},{"id":3035},"第-100-页端到端性能arm-gpu",[3037],{"type":22,"value":3038},"第 100 页｜端到端性能：ARM GPU",{"type":16,"tag":100,"props":3040,"children":3041},{},[3042],{"type":16,"tag":104,"props":3043,"children":3046},{"alt":3044,"src":3045,"width":108,"height":109},"TVM 原始幻灯片第 100 页：端到端性能：ARM GPU","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-100.webp",[],{"type":16,"tag":100,"props":3048,"children":3049},{},[3050],{"type":22,"value":3051},"在 ARM GPU 上比较 ARMComputeLib、TVM（无图优化）和 TVM。",{"type":16,"tag":31,"props":3053,"children":3054},{},[3055,3059,3064],{"type":16,"tag":35,"props":3056,"children":3057},{},[3058],{"type":22,"value":2996},{"type":16,"tag":35,"props":3060,"children":3061},{},[3062],{"type":22,"value":3063},"数据类型：float32 与 float16；",{"type":16,"tag":35,"props":3065,"children":3066},{},[3067],{"type":22,"value":3068},"纵轴：时间（ms）。",{"type":16,"tag":24,"props":3070,"children":3072},{"id":3071},"第-101-页支持新的专用加速器",[3073],{"type":22,"value":3074},"第 101 页｜支持新的专用加速器",{"type":16,"tag":100,"props":3076,"children":3077},{},[3078],{"type":16,"tag":104,"props":3079,"children":3082},{"alt":3080,"src":3081,"width":108,"height":109},"TVM 原始幻灯片第 101 页：支持新的专用加速器","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-101.webp",[],{"type":16,"tag":100,"props":3084,"children":3085},{},[3086,3088,3093,3094,3099],{"type":22,"value":3087},"在框架、高层图优化、面向硬件的张量程序搜索空间和机器学习优化器之下，可通过 ",{"type":16,"tag":39,"props":3089,"children":3090},{},[3091],{"type":22,"value":3092},"LLVM",{"type":22,"value":1059},{"type":16,"tag":39,"props":3095,"children":3096},{},[3097],{"type":22,"value":3098},"CUDA",{"type":22,"value":3100}," 连接不同后端。",{"type":16,"tag":24,"props":3102,"children":3104},{"id":3103},"第-102-页支持新的专用加速器vta",[3105],{"type":22,"value":3106},"第 102 页｜支持新的专用加速器：VTA",{"type":16,"tag":100,"props":3108,"children":3109},{},[3110],{"type":16,"tag":104,"props":3111,"children":3114},{"alt":3112,"src":3113,"width":108,"height":109},"TVM 原始幻灯片第 102 页：支持新的专用加速器：VTA","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-102.webp",[],{"type":16,"tag":100,"props":3116,"children":3117},{},[3118,3120,3125],{"type":22,"value":3119},"新增 ",{"type":16,"tag":39,"props":3121,"children":3122},{},[3123],{"type":22,"value":3124},"VTA：开放且可定制的深度学习加速器（Open, Customizable Deep Learning Accelerator）",{"type":22,"value":3126},"。目标硬件包括边缘 FPGA（Edge FPGA）、数据中心 FPGA（Data Center FPGA）和 ASIC。",{"type":16,"tag":24,"props":3128,"children":3130},{"id":3129},"第-103-页tvmvta全栈开源系统",[3131],{"type":22,"value":3132},"第 103 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3134,"children":3135},{},[3136],{"type":16,"tag":104,"props":3137,"children":3140},{"alt":3138,"src":3139,"width":108,"height":109},"TVM 原始幻灯片第 103 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-103.webp",[],{"type":16,"tag":100,"props":3142,"children":3143},{},[3144],{"type":22,"value":3145},"系统栈的顶层：",{"type":16,"tag":31,"props":3147,"children":3148},{},[3149,3154,3159],{"type":16,"tag":35,"props":3150,"children":3151},{},[3152],{"type":22,"value":3153},"高层优化（High-level Optimizations）；",{"type":16,"tag":35,"props":3155,"children":3156},{},[3157],{"type":22,"value":3158},"张量程序搜索空间（Tensor Program Search Space）；",{"type":16,"tag":35,"props":3160,"children":3161},{},[3162],{"type":22,"value":3163},"基于机器学习的优化器（ML-based Optimizer）。",{"type":16,"tag":24,"props":3165,"children":3167},{"id":3166},"第-104-页tvmvta全栈开源系统",[3168],{"type":22,"value":3169},"第 104 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3171,"children":3172},{},[3173],{"type":16,"tag":104,"props":3174,"children":3177},{"alt":3175,"src":3176,"width":108,"height":109},"TVM 原始幻灯片第 104 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-104.webp",[],{"type":16,"tag":100,"props":3179,"children":3180},{},[3181,3183,3188],{"type":22,"value":3182},"在上述软件栈下加入 ",{"type":16,"tag":39,"props":3184,"children":3185},{},[3186],{"type":22,"value":3187},"VTA 微架构（VTA MicroArchitecture）",{"type":22,"value":569},{"type":16,"tag":24,"props":3190,"children":3192},{"id":3191},"第-105-页tvmvta全栈开源系统",[3193],{"type":22,"value":3194},"第 105 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3196,"children":3197},{},[3198],{"type":16,"tag":104,"props":3199,"children":3202},{"alt":3200,"src":3201,"width":108,"height":109},"TVM 原始幻灯片第 105 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-105.webp",[],{"type":16,"tag":100,"props":3204,"children":3205},{},[3206,3208,3213],{"type":22,"value":3207},"继续加入 ",{"type":16,"tag":39,"props":3209,"children":3210},{},[3211],{"type":22,"value":3212},"VTA 硬件\u002F软件接口（ISA）",{"type":22,"value":3214},"，连接编译器生成的程序与微架构。",{"type":16,"tag":24,"props":3216,"children":3218},{"id":3217},"第-106-页tvmvta全栈开源系统",[3219],{"type":22,"value":3220},"第 106 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3222,"children":3223},{},[3224],{"type":16,"tag":104,"props":3225,"children":3228},{"alt":3226,"src":3227,"width":108,"height":109},"TVM 原始幻灯片第 106 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-106.webp",[],{"type":16,"tag":100,"props":3230,"children":3231},{},[3232,3233,3238],{"type":22,"value":2899},{"type":16,"tag":39,"props":3234,"children":3235},{},[3236],{"type":22,"value":3237},"VTA 运行时与 JIT 编译器（VTA Runtime & JIT Compiler）",{"type":22,"value":3239},"，负责运行时装载和即时编译。",{"type":16,"tag":24,"props":3241,"children":3243},{"id":3242},"第-107-页tvmvta全栈开源系统",[3244],{"type":22,"value":3245},"第 107 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3247,"children":3248},{},[3249],{"type":16,"tag":104,"props":3250,"children":3253},{"alt":3251,"src":3252,"width":108,"height":109},"TVM 原始幻灯片第 107 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-107.webp",[],{"type":16,"tag":100,"props":3255,"children":3256},{},[3257,3258,3263],{"type":22,"value":2899},{"type":16,"tag":39,"props":3259,"children":3260},{},[3261],{"type":22,"value":3262},"VTA 模拟器（VTA Simulator）",{"type":22,"value":3264},"，可在没有真实硬件时验证指令和编译流程。",{"type":16,"tag":24,"props":3266,"children":3268},{"id":3267},"第-108-页tvmvta全栈开源系统",[3269],{"type":22,"value":3270},"第 108 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3272,"children":3273},{},[3274],{"type":16,"tag":104,"props":3275,"children":3278},{"alt":3276,"src":3277,"width":108,"height":109},"TVM 原始幻灯片第 108 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-108.webp",[],{"type":16,"tag":100,"props":3280,"children":3281},{},[3282],{"type":22,"value":3283},"页面列出系统目标：",{"type":16,"tag":31,"props":3285,"children":3286},{},[3287,3292,3297],{"type":16,"tag":35,"props":3288,"children":3289},{},[3290],{"type":22,"value":3291},"JIT 编译加速器微代码（JIT compile accelerator micro code）；",{"type":16,"tag":35,"props":3293,"children":3294},{},[3295],{"type":22,"value":3296},"支持异构设备，在同一开发板上比 CPU 快 10 倍（Support heterogeneous devices, 10x better than CPU on the same board）；",{"type":16,"tag":35,"props":3298,"children":3299},{},[3300],{"type":22,"value":3301},"将硬件复杂性转移到软件（Move hardware complexity to software）。",{"type":16,"tag":24,"props":3303,"children":3305},{"id":3304},"第-109-页tvmvta全栈开源系统",[3306],{"type":22,"value":3307},"第 109 页｜TVM\u002FVTA：全栈开源系统",{"type":16,"tag":100,"props":3309,"children":3310},{},[3311],{"type":16,"tag":104,"props":3312,"children":3315},{"alt":3313,"src":3314,"width":108,"height":109},"TVM 原始幻灯片第 109 页：TVM\u002FVTA：全栈开源系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-109.webp",[],{"type":16,"tag":100,"props":3317,"children":3318},{},[3319,3321,3326],{"type":22,"value":3320},"完整结论：把硬件复杂性转移到软件、编译器、驱动和硬件设计；形成",{"type":16,"tag":39,"props":3322,"children":3323},{},[3324],{"type":22,"value":3325},"全栈开源（full stack open source）",{"type":22,"value":3327},"系统。",{"type":16,"tag":31,"props":3329,"children":3330},{},[3331,3336,3341],{"type":16,"tag":35,"props":3332,"children":3333},{},[3334],{"type":22,"value":3335},"JIT 编译加速器微代码；",{"type":16,"tag":35,"props":3337,"children":3338},{},[3339],{"type":22,"value":3340},"支持异构设备，在同一开发板上达到 CPU 的 10 倍性能；",{"type":16,"tag":35,"props":3342,"children":3343},{},[3344],{"type":22,"value":3345},"开放 VTA 模拟器、ISA、微架构、运行时和 JIT 编译器。",{"type":16,"tag":24,"props":3347,"children":3349},{"id":3348},"第-110-页tvm基于学习的学习系统",[3350],{"type":22,"value":3351},"第 110 页｜TVM：基于学习的学习系统",{"type":16,"tag":100,"props":3353,"children":3354},{},[3355],{"type":16,"tag":104,"props":3356,"children":3359},{"alt":3357,"src":3358,"width":108,"height":109},"TVM 原始幻灯片第 110 页：TVM：基于学习的学习系统","\u002Fimages\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides\u002Fpage-110.webp",[],{"type":16,"tag":100,"props":3361,"children":3362},{},[3363],{"type":22,"value":3364},"总结架构：",{"type":16,"tag":31,"props":3366,"children":3367},{},[3368,3373,3378,3383],{"type":16,"tag":35,"props":3369,"children":3370},{},[3371],{"type":22,"value":3372},"高层优化；",{"type":16,"tag":35,"props":3374,"children":3375},{},[3376],{"type":22,"value":3377},"张量程序搜索空间；",{"type":16,"tag":35,"props":3379,"children":3380},{},[3381],{"type":22,"value":3382},"基于机器学习的优化器；",{"type":16,"tag":35,"props":3384,"children":3385},{},[3386],{"type":22,"value":3387},"LLVM、CUDA、VTA 后端。",{"type":16,"tag":100,"props":3389,"children":3390},{},[3391,3393,3398],{"type":22,"value":3392},"页面号召：",{"type":16,"tag":39,"props":3394,"children":3395},{},[3396],{"type":22,"value":3397},"欢迎体验（Check it out!）",{"type":22,"value":569},{"type":16,"tag":3400,"props":3401,"children":3402},"style",{},[3403],{"type":22,"value":252},{"title":252,"searchDepth":3405,"depth":3406,"links":3407},3,2,[3408,3409,3410,3411,3412,3413,3414,3415,3416,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,3455,3456,3457,3458,3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,3512,3513,3514,3515,3516,3517,3518],{"id":26,"depth":3406,"text":29},{"id":95,"depth":3406,"text":98},{"id":128,"depth":3406,"text":131},{"id":164,"depth":3406,"text":167},{"id":183,"depth":3406,"text":186},{"id":202,"depth":3406,"text":205},{"id":221,"depth":3406,"text":224},{"id":589,"depth":3406,"text":592},{"id":613,"depth":3406,"text":616},{"id":637,"depth":3406,"text":640},{"id":662,"depth":3406,"text":665},{"id":681,"depth":3406,"text":684},{"id":699,"depth":3406,"text":702},{"id":717,"depth":3406,"text":720},{"id":735,"depth":3406,"text":738},{"id":753,"depth":3406,"text":756},{"id":771,"depth":3406,"text":774},{"id":789,"depth":3406,"text":792},{"id":826,"depth":3406,"text":829},{"id":851,"depth":3406,"text":854},{"id":870,"depth":3406,"text":873},{"id":896,"depth":3406,"text":899},{"id":930,"depth":3406,"text":933},{"id":962,"depth":3406,"text":965},{"id":981,"depth":3406,"text":984},{"id":1000,"depth":3406,"text":1003},{"id":1070,"depth":3406,"text":1073},{"id":1096,"depth":3406,"text":1099},{"id":1131,"depth":3406,"text":1134},{"id":1166,"depth":3406,"text":1169},{"id":1207,"depth":3406,"text":1210},{"id":1233,"depth":3406,"text":1236},{"id":1259,"depth":3406,"text":1262},{"id":1284,"depth":3406,"text":1287},{"id":1309,"depth":3406,"text":1312},{"id":1334,"depth":3406,"text":1337},{"id":1366,"depth":3406,"text":1369},{"id":1394,"depth":3406,"text":1397},{"id":1422,"depth":3406,"text":1425},{"id":1448,"depth":3406,"text":1451},{"id":1474,"depth":3406,"text":1477},{"id":1493,"depth":3406,"text":1496},{"id":1518,"depth":3406,"text":1521},{"id":1542,"depth":3406,"text":1545},{"id":1561,"depth":3406,"text":1564},{"id":1580,"depth":3406,"text":1583},{"id":1599,"depth":3406,"text":1602},{"id":1635,"depth":3406,"text":1638},{"id":1661,"depth":3406,"text":1664},{"id":1706,"depth":3406,"text":1709},{"id":1732,"depth":3406,"text":1735},{"id":1787,"depth":3406,"text":1790},{"id":1806,"depth":3406,"text":1809},{"id":1825,"depth":3406,"text":1828},{"id":1865,"depth":3406,"text":1868},{"id":1884,"depth":3406,"text":1887},{"id":1903,"depth":3406,"text":1906},{"id":1928,"depth":3406,"text":1931},{"id":1953,"depth":3406,"text":1956},{"id":1978,"depth":3406,"text":1981},{"id":2010,"depth":3406,"text":2013},{"id":2049,"depth":3406,"text":2052},{"id":2068,"depth":3406,"text":2071},{"id":2087,"depth":3406,"text":2090},{"id":2114,"depth":3406,"text":2117},{"id":2141,"depth":3406,"text":2144},{"id":2160,"depth":3406,"text":2163},{"id":2191,"depth":3406,"text":2194},{"id":2228,"depth":3406,"text":2231},{"id":2270,"depth":3406,"text":2273},{"id":2289,"depth":3406,"text":2292},{"id":2308,"depth":3406,"text":2311},{"id":2334,"depth":3406,"text":2337},{"id":2353,"depth":3406,"text":2356},{"id":2372,"depth":3406,"text":2375},{"id":2391,"depth":3406,"text":2394},{"id":2424,"depth":3406,"text":2427},{"id":2450,"depth":3406,"text":2453},{"id":2475,"depth":3406,"text":2478},{"id":2494,"depth":3406,"text":2497},{"id":2513,"depth":3406,"text":2516},{"id":2532,"depth":3406,"text":2535},{"id":2551,"depth":3406,"text":2554},{"id":2578,"depth":3406,"text":2581},{"id":2610,"depth":3406,"text":2613},{"id":2636,"depth":3406,"text":2639},{"id":2655,"depth":3406,"text":2658},{"id":2680,"depth":3406,"text":2683},{"id":2706,"depth":3406,"text":2709},{"id":2739,"depth":3406,"text":2742},{"id":2765,"depth":3406,"text":2768},{"id":2790,"depth":3406,"text":2793},{"id":2833,"depth":3406,"text":2836},{"id":2857,"depth":3406,"text":2860},{"id":2883,"depth":3406,"text":2886},{"id":2909,"depth":3406,"text":2912},{"id":2934,"depth":3406,"text":2937},{"id":2953,"depth":3406,"text":2956},{"id":2972,"depth":3406,"text":2975},{"id":3009,"depth":3406,"text":3012},{"id":3035,"depth":3406,"text":3038},{"id":3071,"depth":3406,"text":3074},{"id":3103,"depth":3406,"text":3106},{"id":3129,"depth":3406,"text":3132},{"id":3166,"depth":3406,"text":3169},{"id":3191,"depth":3406,"text":3194},{"id":3217,"depth":3406,"text":3220},{"id":3242,"depth":3406,"text":3245},{"id":3267,"depth":3406,"text":3270},{"id":3304,"depth":3406,"text":3307},{"id":3348,"depth":3406,"text":3351},42182,"\u002Fmaterials\u002Fcmu-15-779\u002Ftvm-slides-zh.md",1795088941505]