Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f783b846
P
Paddle
项目概览
PaddlePaddle
/
Paddle
接近 2 年 前同步成功
通知
2323
Star
20933
Fork
5424
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f783b846
编写于
1月 24, 2022
作者:
A
Aurelius84
提交者:
GitHub
1月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move dim_test/ddim_test into tests directory (#39111)
Co-authored-by:
N
Chen Weihang
<
chenweihang@baidu.com
>
上级
def81b4f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
7 deletion
+21
-7
paddle/pten/core/CMakeLists.txt
paddle/pten/core/CMakeLists.txt
+0
-6
paddle/pten/tests/core/CMakeLists.txt
paddle/pten/tests/core/CMakeLists.txt
+8
-0
paddle/pten/tests/core/test_ddim.cc
paddle/pten/tests/core/test_ddim.cc
+6
-0
paddle/pten/tests/core/test_dim.cu
paddle/pten/tests/core/test_dim.cu
+7
-1
未找到文件。
paddle/pten/core/CMakeLists.txt
浏览文件 @
f783b846
...
...
@@ -23,12 +23,6 @@ cc_library(infermeta_utils SRCS infermeta_utils.cc DEPS meta_tensor)
cc_test
(
unroll_array_ops_test SRCS unroll_array_ops_test.cc
)
cc_library
(
ddim SRCS ddim.cc DEPS eigen3 boost enforce
)
cc_test
(
ddim_test SRCS ddim_test.cc DEPS ddim
)
if
(
WITH_GPU
)
nv_test
(
dim_test SRCS dim_test.cu DEPS ddim
)
elseif
(
WITH_ROCM
)
hip_test
(
dim_test SRCS dim_test.cu DEPS ddim
)
endif
()
cc_library
(
selected_rows SRCS selected_rows.cc DEPS dense_tensor mixed_vector enforce ddim
)
...
...
paddle/pten/tests/core/CMakeLists.txt
浏览文件 @
f783b846
...
...
@@ -4,6 +4,14 @@ cc_test(test_type_info SRCS test_type_info.cc)
cc_test
(
test_convert_utils SRCS test_convert_utils.cc DEPS convert_utils
)
cc_test
(
test_kernel_factory SRCS test_kernel_factory.cc DEPS kernel_factory scale_kernel
)
cc_test
(
test_pten_device_context SRCS test_device_context.cc DEPS pten_context cpu_context
)
cc_test
(
test_ddim SRCS test_ddim.cc DEPS ddim
)
if
(
WITH_GPU
)
nv_test
(
test_dim SRCS test_dim.cu DEPS ddim
)
elseif
(
WITH_ROCM
)
hip_test
(
test_dim SRCS test_dim.cu DEPS ddim
)
endif
()
cc_test
(
selected_rows_test SRCS test_selected_rows.cc DEPS selected_rows
)
if
(
WITH_TESTING AND TEST selected_rows_test
)
set_tests_properties
(
selected_rows_test PROPERTIES TIMEOUT 120
)
...
...
paddle/pten/
core/ddim_test
.cc
→
paddle/pten/
tests/core/test_ddim
.cc
浏览文件 @
f783b846
...
...
@@ -17,6 +17,9 @@
#include "gtest/gtest.h"
#include "paddle/pten/core/ddim.h"
namespace
pten
{
namespace
tests
{
TEST
(
DDim
,
Equality
)
{
// construct a DDim from an initialization list
pten
::
framework
::
DDim
ddim
=
pten
::
framework
::
make_ddim
({
9
,
1
,
5
});
...
...
@@ -81,3 +84,6 @@ TEST(DDim, Print) {
ss
<<
ddim
;
EXPECT_EQ
(
"2, 3, 4"
,
ss
.
str
());
}
}
// namespace tests
}
// namespace pten
paddle/pten/
core/dim_test
.cu
→
paddle/pten/
tests/core/test_dim
.cu
浏览文件 @
f783b846
...
...
@@ -18,6 +18,9 @@
#include "gtest/gtest.h"
#include "paddle/pten/core/dim.h"
namespace
pten
{
namespace
tests
{
__global__
void
test
(
pten
::
framework
::
Dim
<
2
>*
o
)
{
o
[
0
]
=
pten
::
framework
::
make_dim
(
5
,
6
);
}
...
...
@@ -94,4 +97,7 @@ TEST(Dim, Print) {
ss
<<
pten
::
framework
::
make_dim
(
8
);
EXPECT_EQ
(
ss
.
str
(),
"8"
);
}
}
\ No newline at end of file
}
}
// namespace tests
}
// namespace pten
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录