共 1,304 篇文章
共 6,317 篇文章及评论
博客分类
Blog Roll
- Association for Computing Machinery TechNews (ACM)
- Go Parallel! (Dr. Dobbs)
- HPCwire (Tabor Communications, Inc.)
- insideHPC (John West)
- Joe Duffy's Weblog (Microsoft)
- Microsoft Parallel Programming Development Center (Microsoft Germany)
- MultiCoreInfo.com
- scalability.org (Scalable Informatics)
- Software Dev Blog (Intel Germany)
- Soft Talk Blog (Intel United Kingdom)
- The Moth (Microsoft)
读针对AVX优化代码 --- 优化issue port的使用
作者: 甘驰 (Intel) (20 篇文章) 日期: 一月 26, 2010 在 3:50 下午
本文中的issue port专指CPU内部向其他执行单元(ALU, SSE MUL, DIV, Load, STD…)发送指令的通道,在Intel Micro Architectur(Sandy Bridge)中共有6个ports,port2,3,4负责存储单元,port0,1,5负责计算单元。若干计算单元会共享一个port,由于每个issue port只能同时向一个单元发送指令,故有时它们成为瓶颈,特别是port0,1,5。选择合适的指令来避免,如你的代码中大量用到shuffles指令,它们只能通过port5被发送,所以你要用vmovsldup ymm2, [mem]代替vmovsldup ymm2, ymm3来准备数据, 因为前者通过load port(2,3)发送,而后者通过port5。
Intel® 64 and IA-32 Architectures Optimization Reference Manual(248966)的54页列出了(Nehalem)issue port 和执行单元的对应关系。下表建立执行单元与port的关系
| Executable operations | Port |
| Integer ALU | 0,1,5 |
| Integer Shift | 0,5 |
| Integer MUL | 1 |
| Integer LEA | 1 |
| Integer SIMD ALU | 0,1,5 |
| Integer SIMD Shift | 1 |
| Integer SIMD Shuffle | 0,5 |
| StringCompare | 1 |
| FP ADD | 1 |
| (SP) FP MUL | 0 |
| (DP) FP MUL | 0 |
| FP MUL(X87) | 0 |
| FP/SIMD/SSE2 Move & Logic | 0,5 |
| FP Shuffle | 0 |
| DIV/SQRT | 0 |
| JMP | 5 |
当你的程序大量使用那些只有一个issue port能发送的指令,要引起注意。当然Intel编译器会帮你优化,除非你直接写汇编。
分类: 并行计算
标签:AVX, issue port
如需了解英特尔软件产品相关的性能和优化选项,请参阅优化注意事项.
评论 (1)
引用 (0)
写评论 
欲获得技术支持,请访问软件支持页面.

Yanqing Wang (Intel)
10,053