高级体系结构_第1页
高级体系结构_第2页
高级体系结构_第3页
高级体系结构_第4页
高级体系结构_第5页
已阅读5页,还剩162页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、高性能计算机体系结构,乔百友(83681250) 东北大学信息学院计算机系统研究所,高性能计算机体系结构,参考教材 Computer Architecture: A Quantitative Approach, Hennessy and Patterson, 机械工业 高等计算机系统结构并行性可扩展性可编程性 清华大学出版社 Parallel Computer Architecture -A Hardware/software Approach 机械工业 计算机系统结构 张晨曦等,高等教育出版社,2008 并行计算机系统结构与可扩展计算,古志民、孙贤和清华大学出版社 2009 并行计算机体系结

2、构,陈国良等著,高等教育出版社,2002,主要内容,1.高性能计算与高性能计算机 2.指令流水技术基础(复习) 3.指令级并行性 4.指令的动态调度与分支预测 5.互连网络:拓扑结构,寻径技术, 6.并行处理基础:模型,性能,自动并行化 7.共享存储器多处理机:cache一致性,同步 8.大规模并行处理:主动消息, 多线程,4,1. 高性能计算的意义 2. 高性能计算的发展与现状 3. 高性能计算的典型应用 4. 高性能计算的挑战与机遇,高性能计算与高性能计算机,国家高性能计算中心(合肥),5,2020/7/12,1. 高性能计算的意义,1.1 高性能计算的内在含义 1.2 高性能计算的应用需

3、求 1.3 高性能计算的战略地位,6,1. 高性能计算的意义(1),1.1 高性能计算的内在含义 计算和计算科学 所有的学科都转向定量化和精确化 三大科学:理论科学、实验科学和计算科学 计算科学是一个交叉学科, 用计算的方法来解决应用问题。 适用于理论模型复杂或尚未建立、实验费用昂贵或无法进行。 计算物理、计算化学、计算生物学、计算地质学、计算气象学。 并行计算是跟上摩尔定律的重要手段。,1. 高性能计算的意义(2),高性能计算 HPC(High Performance Compute)泛指量大、快速、高效的运算,高性能计算-并行计算 并行计算(Parallel Computing) 高端计算

4、(High-end Parallel Computing) 高性能计算(High Performance Computing) 超级计算(Super Computing),8,1. 高性能计算的意义(3),高性能计算主要包括: 向量计算 并行计算 分布式计算 网络计算 网格计算 云计算,Northeastern University Sep. 6, 2012,云计算是并行计算(Parallel Computing)、分布式计算(Distributed Computing)和网格计算(Grid Computing)的发展,或者说是这些计算机科学概念的商业实现,云计算是虚拟化(Virtualiza

5、tion)、效用计算(Utility Computing)、IaaS(基础设施即服务)、PaaS(平台即服务)、SaaS(软件即服务)等概念混合演进并跃升的结果,10,1. 高性能计算的意义(4),高性能计算的量纲,11,1. 高性能计算的意义(5),1.2 高性能计算的应用需求 应用需求 计算密集型应用(Computing-intensive): 大型科学工程计算,数值模拟等。 应用领域:石油、气象、CAD、核能、制药、环境监测分析、系统仿真等。 数据密集型应用(Data-intensive): 数字图书馆,数据仓库,数据挖掘,计算可视化等。 应用领域:图书馆、银行、证券、税务、决策支持系统

6、等。 通信密集型应用(Network-intensive): 协同工作,网格计算,遥控和远程诊断等。 应用领域:网站、信息中心、搜索引擎、电信、流媒体等。,12,1. 高性能计算的意义(6),千万亿次超级计算机的应用需求,天气预报 1990年10次台风登陆,福建、浙江两省损失79亿元,死亡950余人。 天气预报模式为非线性偏微分方程,预报台风暴雨过程,计算量为10141016次浮点运算,需要10GFlops100GFlops的巨型机。 用途:局部灾害性天气预报。,石油工业 地震勘探资料处理 油藏数值模拟 测井资料处理 地震勘探由数据采集、数据处理和资料解释三阶段组成。 目前采用的三维地震勘探比

7、较精确的反映地下情况,但数据量大,处理周期长。 100平方公里的三维勘探面积,道距25米,60次覆盖,6秒长记录,2毫秒采样,一共采集2.881010个数据,约为116GB。,叠加后数据为4.8108个数据。用二维叠加深度偏移方法精确的产生地下深度图像,需要进行251012FLOP,采用100MFLOPs机器计算250天,1GFLOPs机计算25天,10GFLOPs机器35分。考虑到机器持续速度常常是峰值速度的10-30%,所以需要100GFlops的机器。Cray T932/32约为60GFLOPs。,航空航天 研究三维翼型对飞机性能的影响。数值模拟用时间相关法解Navier-Stoker方

8、程,网格分点为1204050,需内存160MB,6亿计算机上解12小时,如果在数分钟内完成设计,则需要千亿次计算机。,核武器 核爆炸数值模拟,推断出不同结构与不同条件下核装置的能量释放效应。 压力:几百万大气压 温度:几千万摄氏度 能量在秒级内释放出来。 设计一个核武器型号,从模型规律、调整各种参数到优选,需计算成百上千次核试验。 Los Alamos实验室要求计算一个模型的上限为8-10小时。,千万次机上算椭球程序的计算模型需要40-60 CPU小时。 二维计算,每方向上网格点数取100,二维计算是一维的200倍,三维是一维的33000倍。若每维设1000网格点,则三维计算是一维的几十万倍之

9、多。此时对主存储器容量要数十、数百亿字单元(64位)。 另外还有I/O能力的要求,可视化图形输出 计算空气动力学:千亿次/秒(1011) 图像处理: 百亿次/秒(1010) AI: 万亿次/秒(1012),23,1. 高性能计算的意义(7),1.3 高性能计算的战略地位 从战略高度上讲 高性能计算技术是一个国家综合国力和科技创新力的重要标志,各个国家竞相争夺的战略制高点。 高性能高计算是支撑国家实力持续发展的关键技术之一 。 高性能计算国防安全、高科技发展和国民经济建设中占有重要的战略地位。 重大挑战问题:飞机设计、药物设计、全球气候预测、人类基因、海洋环流新材料、油藏数值模拟、生物分子结构、

10、半导体建模、超导建模等。,24,1. 高性能计算的意义(8),高性能计算在发达国家的战略地位(1) 美国有关发展高性能计算的建议报告 从1982年到2005年,美国国防部、能源部、国家科学院、国家科学基金委以及美国总统信息技术顾问委员会、美国信息技术咨询委员会、美国国家竞争力委员会等提出的有关信息技术和计算机的建议报告中,大都涉及到了高性能超级计算机的内容。,25,1. 高性能计算的意义(9),高性能计算在发达国家的战略地位(2) 清单(按年代排序) 1982年,美国国家科学院:关于科学研究及工程中的大规模计算 1993年,美国国家科学院:从台式计算机到万亿次计算机:充分发挥美国在高性能计算领

11、域领导权 1995年,美国国家科学院:特别工作组关于未来国家科学基金委超级计算中心计划报告 1996年,美国总统信息技术顾问委员会:信息技术研究:为了未来 2000年,美国国家科学院:促使信息技术更好 2001年,美国国家科学院:无处不在 2002年,美国国防部:适用于国家安全部门的高性能计算 2003年,美国能源部:基于科学的大规模模拟2003年,美国国家科学基金委:通过计算机基础结构变革科学与工程2003年,美国国家科学基金委:信息时代的知识丢失 2004年,美国国家竞争力委员会:促使美国变革并提高竞争力2004年,美国跨机构:联邦高端计算计划高端计算复兴特别工作组 2005年,美国国家科

12、学院:超级计算机未来2005年,美国总统信息技术顾问委员会:计算科学:确保美国竞争力,26,1. 高性能计算的意义(10),高性能计算在发达国家的战略地位(3) 美国发展有关高性能计算的行动计划 1993年,美国科学工程技术联邦协调理事会:HPCC (High performance Computing 系统是对称的; 微处理器: 一般少于64个; 处理器不能太多, 总线和交叉开关的一旦作成难于扩展; 例子: IBM R50, SGI Power Challenge, SUN Enterprise, 曙光一号;,分布式共享存储系统(DSM),DSM 分布共享存储: 内存模块物理上局部于各个处理

13、器内部,但逻辑上(用户)是共享存储的; 这种结构也称为基于Cache目录的非一致内存访问(CC-NUMA)结构;局部与远程内存访问的延迟和带宽不一致,3-10倍高性能并行程序设计注意; 与SMP的主要区别:DSM在物理上有分布在各个节点的局部内存从而形成一个共享的存储器; 微处理器: 16-128个,几百到千亿次; 代表: SGI Origin 2000, Cray T3D;,大规模并行计算机系统(MPP),MPP 物理和逻辑上均是分布内存 能扩展至成百上千个处理器(微处理器或向量处理器) 采用高通信带宽和低延迟的互联网络 (专门设计和定制的) 一种异步的MIMD机器;程序系由多个进程组成,每

14、个都有其私有地址空间,进程间采用传递消息相互作用; 代表:CRAY T3E(2048), ASCI Red(3072), IBM SP2, 曙光1000,集群系统(Cluster),Cluster 每个节点都是一个完整的计算机 各个节点通过高性能网络相互连接 网络接口和I/O总线松耦合连接 每个节点有完整的操作系统 曙光2000、 3000、4000, ASCI Blue Mountain,访存模型,UMA:,NORMA:,NUMA:,多处理机(单地址空间共享存储器) UMA: Uniform Memory Access NUMA: Nonuniform Memory Access 多计算机(

15、多地址空间非共享存储器) NORMA: No-Remote Memory Access,结构模型访存模型,UMA:,NUMA:,NORMA:,多处理机 64-byte line size 10 clock cycles latency; Write Back update policy,139,Intel Multi-core Plan,140,Intel Multi-core Plan,Intels tera-scale chip,142,Cell from IBM and Sony,143,Cell from IBM and Sony,Intel 80核芯片(2007),80个处理核心 1

16、 Teraflop 100亿次运算/瓦特 主频3.1GHz 面积 300mm, 各CPU内核与内存1对1地连接,分别拥有256MBps的内存带宽 32MB的片上静态RAM 。 单芯片整体的内存带宽达到了1TB/s,13.75mm * 22 mm,IBM POWER7(2010),146,Niagara from SUN,147,GPU,Transform,CPU,Application,Rasterize,Shade,VideoMemory(Textures),Xformed, Lit Vertices (2D),Graphics State,Render-to-texture,Assembl

17、ePrimitives,Vertices (3D),Screenspace triangles (2D),Fragments (pre-pixels),Final Pixels (Color, Depth),Programmable vertex processor!,Programmable pixel processor!,FragmentProcessor,GPU Fundamentals: The Modern Graphics Pipeline,VertexProcessor,GeometryProcessor,148,GPU Fundamentals: The Modern Gra

18、phics Pipeline,For a specific program compiled to run on a specific machine “A”, the following parameters are provided: The total instruction count of the program. The average number of cycles per instruction (average CPI). Clock cycle of machine “A” How can one measure the performance of this machi

19、ne running this program? Intuitively the machine is said to be faster or has better performance running this program if the total execution time is shorter. Thus the inverse of the total measured program execution time is a possible performance measure or metric: PerformanceA = 1 / Execution TimeA H

20、ow to compare performance of different machines? What factors affect performance? How to improve performance?,Computer Performance Measures: Program Execution Time,CPU Execution Time: The CPU Equation,A program is comprised of a number of instructions, I Measured in:instructions/program The average

21、instruction takes a number of cycles per instruction (CPI) to be completed. Measured in: cycles/instruction IPC (Instructions Per Cycle) = 1/CPI CPU has a fixed clock cycle time C = 1/clock rate Measured in: seconds/cycle CPU execution time is the product of the above three parameters as follows: CP

22、U Time = IC x CPI x CC,Factors Affecting CPU Performance,CPI IPC,Clock Cycle C,Instruction Count I,Program,Compiler,Organization (Micro-Architecture),Technology,Instruction Set Architecture (ISA),X,X,X,X,X,X,X,X,X,Metrics of Computer Performance,Compiler,Programming Language,Application,Datapath,Con

23、trol,Transistors,Wires,Pins,ISA,Function Units,Cycles per second (clock rate).,Megabytes per second.,Execution time: Target workload, SPEC95, SPEC2000, etc.,Each metric has a purpose, and each can be misused.,(millions) of Instructions per second MIPS (millions) of (F.P.) operations per second MFLOP

24、/s,SPEC: System Performance Evaluation Cooperative,The most popular and industry-standard set of CPU benchmarks. SPECmarks, 1989: 10 programs yielding a single number (“SPECmarks”). SPEC92, 1992: SPECInt92 (6 integer programs) and SPECfp92 (14 floating point programs). SPEC95, 1995: SPECint95 (8 int

25、eger programs): go, m88ksim, gcc, compress, li, ijpeg, perl, vortex SPECfp95 (10 floating-point intensive programs): tomcatv, swim, su2cor, hydro2d, mgrid, applu, turb3d, apsi, fppp, wave5 Performance relative to a Sun SuperSpark I (50 MHz) which is given a score of SPECint95 = SPECfp95 = 1 SPEC CPU

26、2000, 1999: CINT2000 (11 integer programs). CFP2000 (14 floating-point intensive programs) Performance relative to a Sun Ultra5_10 (300 MHz) which is given a score of SPECint2000 = SPECfp2000 = 100,Top 20 SPEC CPU2000 Results (As of March 2002),# MHz Processor int peak int baseMHz Processor fp peak

27、fp base 1 1300 POWER4 814 790 1300 POWER4 1169 1098 2 2200 Pentium 4 811 790 1000 Alpha 21264C 960 776 32200 Pentium 4 Xeon 810 7881050 UltraSPARC-III Cu 827 701 4 1667 Athlon XP 724 697 2200 Pentium 4 Xeon 802 779 5 1000 Alpha 21264C 679 621 2200 Pentium 4 801 779 6 1400 Pentium III 664 648 833 Alp

28、ha 21264B 784 643 7 1050 UltraSPARC-III Cu 610 537 800 Itanium 701 701 8 1533 Athlon MP 609 587 833 Alpha 21264A 644 571 9 750 PA-RISC 8700 604 568 1667 Athlon XP 642 596 10 833 Alpha 21264B 571 497 750 PA-RISC 8700 581 526 11 1400 Athlon 554 495 1533 Athlon MP 547 504 12 833 Alpha 21264A 533 511 60

29、0 MIPS R14000 529 499 13 600 MIPS R14000 500 483 675 SPARC64 GP 509 371 14 675 SPARC64 GP 478 449 900 UltraSPARC-III 482 427 15 900 UltraSPARC-III 467 438 1400 Athlon 458 426 16 552 PA-RISC 8600 441 417 1400 Pentium III 456 437 17 750POWER RS64-IV 439 409 500 PA-RISC 8600 440 397 18 700 Pentium III

30、Xeon 438 431 450 POWER3-II 433 426 19 800 Itanium 365 358 500 Alpha 21264 422 383 20 400 MIPS R12000 353 328 400 MIPS R12000 407 382,Source: ,Top 20 SPECfp2000,Top 20 SPECint2000,Quantitative Principles of Computer Design,Amdahls Law: The performance gain from improving some portion of a computer is

31、 calculated by: Speedup = Performance for entire task using the enhancement Performance for the entire task without using the enhancement or Speedup = Execution time without the enhancement Execution time for entire task using the enhancement,Performance Enhancement Calculations: Amdahls Law,The per

32、formance enhancement possible due to a given design improvement is limited by the amount that the improved feature is used Amdahls Law: Performance improvement or speedup due to enhancement E: Execution Time without E Performance with E Speedup(E) = - = - Execution Time with E Performance without E

33、Suppose that enhancement E accelerates a fraction F of the execution time by a factor S and the remainder of the time is unaffected then: Execution Time with E = (1-F) + F/S) X Execution Time without E Hence speedup is given by: Execution Time without E 1 Speedup(E) = - = - (1 - F) + F/S) X Executio

34、n Time without E (1 - F) + F/S,Pictorial Depiction of Amdahls Law,Before: Execution Time without enhancement E:,Unaffected, fraction: (1- F),After: Execution Time with enhancement E:,Enhancement E accelerates fraction F of execution time by a factor of S,Affected fraction: F,F/S,Unchanged,Execution

35、Time without enhancement E 1 Speedup(E) = - = - Execution Time with enhancement E (1 - F) + F/S,Performance Enhancement Example,For the RISC machine with the following instruction mix given earlier: Op FreqCyclesCPI(i)% Time ALU 50% 1 .5 23% Load 20% 5 1.0 45% Store 10% 3 .3 14% Branch 20% 2 .4 18%

36、If a CPU design enhancement improves the CPI of load instructions from 5 to 2, what is the resulting performance improvement from this enhancement: Fraction enhanced = F = 45% or .45 Unaffected fraction = 100% - 45% = 55% or .55 Factor of enhancement = 5/2 = 2.5 Using Amdahls Law: 1 1 Speedup(E) = -

37、 = - = 1.37 (1 - F) + F/S .55 + .45/2.5,CPI = 2.2,Extending Amdahls Law To Multiple Enhancements,Suppose that enhancement Ei accelerates a fraction Fi of the execution time by a factor Si and the remainder of the time is unaffected then:,Note: All fractions refer to original execution time.,Amdahls

38、Law With Multiple Enhancements: Example,Three CPU or system performance enhancements are proposed with the following speedups and percentage of the code execution time affected: Speedup1 = S1 = 10Percentage1 = F1 = 20% Speedup2 = S2 = 15 Percentage1 = F2 = 15% Speedup3 = S3 = 30Percentage1 = F3 = 10% While all three enhancements are in place in the new design, each enhancement affe

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论