我想计算图形硬件的理论峰值性能。嗯,实际上我想了解计算。
以 AMD Radeon HD 6670 为例:AMD 加速并行处理编程指南 ( http://developer.amd.com/download/AMD_Accelerated_Parallel_Processing_OpenCL_Programming_Guide.pdf ) 在第 6-42 页中间告诉我要获取流核心的数量 ( 96),将其乘以每个流核心每个周期的操作数(我们采用单精度 ADD,即 5),然后乘以核心时钟 (800 MHz)。结果是:
96 * 5 FLOPS * 800MHz = 384,000 MFLOPS = 384 GFLOPS
同一份文档在 D-4 页上告诉我,该特定设备的峰值吞吐量为 768 GFLOPS,是我刚刚计算的两倍。维基百科和 AMD 主页的说法相同。
所以我的问题是:我在哪里遗漏了二的因数?
我试图理解性能事件的含义:dTLB 加载和 dTLB 存储?
我编写了乘以 arr1*arr2 并将结果保存到 arr3 的程序。
Pseudocode:
arr3[i]=arr1[i]*arr2[i]
Run Code Online (Sandbox Code Playgroud)
我想使用 AVX 指令。我有 m128 和 m256 指令的汇编代码(展开)。结果表明,使用 ymm 比 xmm 慢 4 倍。但为什么?如果延迟相同..
Mul_ASM_AVX proc ; (float* RCX=arr1, float* RDX=arr2, float* R8=arr3, int R9 = arraySize)
push rbx
vpxor xmm0, xmm0, xmm0 ; Zero the counters
vpxor xmm1, xmm1, xmm1
vpxor xmm2, xmm2, xmm2
vpxor xmm3, xmm3, xmm3
mov rbx, r9
sar r9, 4 ; Divide the count by 16 for AVX
jz MulResiduals ; If that's 0, then we have only scalar …Run Code Online (Sandbox Code Playgroud) 请参阅https://github.com/torvalds/linux/blob/master/arch/x86/entry/entry_64_compat.S 中的评论
我知道因为 32 位 syscall/sysret 不保存/恢复 ESP,所以有必要在任务门中处理 NMI 以确保良好的堆栈指针。除此之外,操作系统采用它的其他障碍是什么?是否有操作系统支持它或所有操作系统都使用 sysenter/sysexit 在 32 位传统模式下进行快速系统调用?
我已经查找过 X86-64 处理器的 NUMA 文档,不幸的是我只找到了 NUMA 的优化文档。
我想要的是:如何在系统中初始化 NUMA(这包括获取系统的内存拓扑和处理器拓扑)。有谁知道有关 X86-64 AMD 和 Intel 处理器的 NUMA 的好文档吗?
我已多次看到这个问题,但从未找到Windows的答案.我最近将我的CUDA代码移植到OpenCL.使用ATI卡进行测试时,Catalyst驱动程序包含CPU OpenCL驱动程序,因此我可以在CPU上运行OpenCL代码.使用NVIDIA卡进行测试时,CPU没有驱动程序.
问题是:如何在运行Nvidia卡时安装(和部署)CPU驱动程序?
非常感谢
我正在尝试使用OpenCL的AMD实现编写Hello World应用程序. http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/introductory-tutorial-to-opencl/
我设置的目录,LIB,等这里
以下编译:
#include "stdafx.h"
#include <CL/cl.h>
int _tmain(int argc, _TCHAR* argv[])
{
cl_platform_id test;
cl_uint num;
cl_uint ok = 1;
clGetPlatformIDs(ok, &test, &num);
return 0;
Run Code Online (Sandbox Code Playgroud)
}
然而,
#include "stdafx.h"
#include <utility>
#include <CL/cl.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
cl::vector< cl::Platform > platformList;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
才不是.
我收到以下错误:
Error 1 error C2039: 'vector' : is not a member of 'cl' D:\Documents\Projects\Visual Studio\C++\cl_helloworld\cl_helloworld\cl_helloworld.cpp 12 1 cl_helloworld
Error 2 error C2065: 'vector' : undeclared identifier D:\Documents\Projects\Visual Studio\C++\cl_helloworld\cl_helloworld\cl_helloworld.cpp 12 …Run Code Online (Sandbox Code Playgroud) 我似乎无法在Windows 7 AMD 64位计算机上使用32位的Python 3.4.1获得NumPy 1.9.0.
我下载包,解压缩并运行:
python setup.py install
Run Code Online (Sandbox Code Playgroud)
以下是我在命令shell中获得的消息.
我认为我的问题是我没有带有MLK二进制文件的英特尔机器,因为我有一个AMD处理器.我尝试了很多谷歌搜索结果; 没有快乐.
关于如何成功的任何建议?
F:\Tools\numpy-1.9.0>python setup.py install
Running from numpy source directory.
F:\Tools\python-3.4.1\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
non-existing path in 'numpy\\distutils': 'site.cfg'
non-existing path in 'numpy\\f2py': 'docs'
non-existing path in 'numpy\\f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['F:\\Tools\\python-3.4.1\\lib', 'C:\\', 'F:\\Tools\\python-3.4.1\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['F:\\Tools\\python-3.4.1\\lib', 'C:\\', 'F:\\Tools\\python-3.4.1\\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['F:\\Tools\\python-3.4.1\\lib', 'C:\\', …Run Code Online (Sandbox Code Playgroud) 正如我一直所理解的那样,AMD 通过对英特尔的指令集进行逆向工程来构建他们的 CPU,现在支付给英特尔使用他们的指令集,而英特尔对 AMD 的 64 位指令也是如此。
这就是 Windows 可以安装在两种类型的 CPU 上的方式,而无需购买特定版本,例如为 ARM 编译的版本,因此所有应用程序、游戏等都以相同的方式工作,可在 CPU 上互换工作......
然而最近有些事情让我质疑其中的一些......
首先,我注意到一些游戏在我的系统 (AMD) 上有点滞后,阅读后发现游戏针对 Intel CPU 进行了优化......
此外,OSX 是在 Intel CPU 上销售的,但在发现 hackintosh 社区之后,事实证明让 OSX 在 AMD 上运行是可能的,但非常困难。这是因为 OSX 再次是为英特尔设计的......
这些事情之后..
针对 Intel 或 AMD 进行优化意味着什么?如果它们旨在相互替换,怎么可能对一个而不是另一个进行不同/优化?即都支持相同的指令等。
我正在阅读有关控制寄存器的 Intel 文档,但我很难理解 CR8 寄存器的使用方式。引用文档(2-18卷3A):
\n\n\n\n\n任务优先级(CR8 的位 3:0)\xe2\x80\x94 这设置对应于要阻止的最高优先级中断的阈值\n。A\n 值为 0 表示所有中断均已启用。该字段在 64 位模式下可用。值 15 表示所有中断将被禁用。
\n
如果您不介意的话,我有 3 个简短的问题:
\n\n因此 CR8 的位 3 到 0 构成了这 16 个优先级值。但优先事项是什么?我认为是一个正在运行的“线程”,对吗?
但是,与接收中断以查看是否必须被阻止时相比,CR8 中的优先级值是多少?
当中断被阻塞时,这意味着什么?它是“延迟”到以后的时间,还是只是被丢弃,即丢失?