Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
5c480d6f
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5c480d6f
编写于
12月 09, 2016
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add reference to CPUID
上级
4f73e3f6
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
11 deletion
+8
-11
paddle/utils/CpuId.cpp
paddle/utils/CpuId.cpp
+1
-1
paddle/utils/CpuId.h
paddle/utils/CpuId.h
+1
-1
paddle/utils/tests/test_SIMDFlags.cpp
paddle/utils/tests/test_SIMDFlags.cpp
+6
-9
未找到文件。
paddle/utils/CpuId.cpp
浏览文件 @
5c480d6f
...
@@ -34,7 +34,7 @@ static InitFunction __init_simd_flags(
...
@@ -34,7 +34,7 @@ static InitFunction __init_simd_flags(
SIMDFlags
::
SIMDFlags
()
{
SIMDFlags
::
SIMDFlags
()
{
unsigned
int
cpuInfo
[
4
];
unsigned
int
cpuInfo
[
4
];
// CPUID: https://en.wikipedia.org/wiki/CPUID
CPUID
(
cpuInfo
,
0x00000001
);
CPUID
(
cpuInfo
,
0x00000001
);
simd_flags_
|=
cpuInfo
[
3
]
&
(
1
<<
25
)
?
SIMD_SSE
:
SIMD_NONE
;
simd_flags_
|=
cpuInfo
[
3
]
&
(
1
<<
25
)
?
SIMD_SSE
:
SIMD_NONE
;
simd_flags_
|=
cpuInfo
[
3
]
&
(
1
<<
26
)
?
SIMD_SSE2
:
SIMD_NONE
;
simd_flags_
|=
cpuInfo
[
3
]
&
(
1
<<
26
)
?
SIMD_SSE2
:
SIMD_NONE
;
...
...
paddle/utils/CpuId.h
浏览文件 @
5c480d6f
...
@@ -61,7 +61,7 @@ private:
...
@@ -61,7 +61,7 @@ private:
#define HAS_SSE3 SIMDFlags::instance()->isSSE3()
#define HAS_SSE3 SIMDFlags::instance()->isSSE3()
#define HAS_SSSE3 SIMDFlags::instance()->isSSSE3()
#define HAS_SSSE3 SIMDFlags::instance()->isSSSE3()
#define HAS_SSE41 SIMDFlags::instance()->isSSE41()
#define HAS_SSE41 SIMDFlags::instance()->isSSE41()
#define HAS_SS
S
42 SIMDFlags::instance()->isSSE42()
#define HAS_SS
E
42 SIMDFlags::instance()->isSSE42()
#define HAS_FMA3 SIMDFlags::instance()->isFMA3()
#define HAS_FMA3 SIMDFlags::instance()->isFMA3()
#define HAS_FMA4 SIMDFlags::instance()->isFMA4()
#define HAS_FMA4 SIMDFlags::instance()->isFMA4()
#define HAS_AVX SIMDFlags::instance()->isAVX()
#define HAS_AVX SIMDFlags::instance()->isAVX()
...
...
paddle/utils/tests/test_SIMDFlags.cpp
浏览文件 @
5c480d6f
...
@@ -23,14 +23,11 @@ TEST(SIMDFlags, gccTest) {
...
@@ -23,14 +23,11 @@ TEST(SIMDFlags, gccTest) {
CHECK
(
__builtin_cpu_supports
(
"sse"
)
==
HAS_SSE
);
CHECK
(
__builtin_cpu_supports
(
"sse"
)
==
HAS_SSE
);
CHECK
(
__builtin_cpu_supports
(
"sse2"
)
==
HAS_SSE2
);
CHECK
(
__builtin_cpu_supports
(
"sse2"
)
==
HAS_SSE2
);
CHECK
(
__builtin_cpu_supports
(
"sse3"
)
==
HAS_SSE3
);
CHECK
(
__builtin_cpu_supports
(
"sse3"
)
==
HAS_SSE3
);
CHECK
(
__builtin_cpu_supports
(
"ssse3"
)
==
HAS_SSSE3
);
CHECK
(
__builtin_cpu_supports
(
"ssse3"
)
==
HAS_SSSE3
);
CHECK
(
__builtin_cpu_supports
(
"sse4.1"
)
==
HAS_SSE41
);
CHECK
(
__builtin_cpu_supports
(
"sse4.1"
)
==
HAS_SSE41
);
CHECK
(
__builtin_cpu_supports
(
"sse4.2"
)
==
HAS_SSE42
);
CHECK
(
__builtin_cpu_supports
(
"sse4.2"
)
==
HAS_SSE42
);
CHECK
(
__builtin_cpu_supports
(
"fma3"
)
==
HAS_FMA3
);
CHECK
(
__builtin_cpu_supports
(
"avx"
)
==
HAS_AVX
);
CHECK
(
__builtin_cpu_supports
(
"fma4"
)
==
HAS_FMA4
);
CHECK
(
__builtin_cpu_supports
(
"avx2"
)
==
HAS_AVX2
);
CHECK
(
__builtin_cpu_supports
(
"avx"
)
==
HAS_AVX
);
CHECK
(
__builtin_cpu_supports
(
"avx2"
)
==
HAS_AVX2
);
CHECK
(
__builtin_cpu_supports
(
"avx512f"
)
==
HAS_AVX512
);
#endif
#endif
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录