Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
ae6a8271
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
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看板
未验证
提交
ae6a8271
编写于
9月 05, 2022
作者:
R
ronnywang
提交者:
GitHub
9月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CustomDevice] unittests tracking the fixed version plugin (#45553)
* [CustomDevice] unittests tracking the fixed version plugin * update
上级
1523ddc8
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
35 addition
and
8 deletion
+35
-8
python/paddle/fluid/tests/custom_runtime/CMakeLists.txt
python/paddle/fluid/tests/custom_runtime/CMakeLists.txt
+12
-4
python/paddle/fluid/tests/custom_runtime/test_collective_process_group_xccl.py
...ests/custom_runtime/test_collective_process_group_xccl.py
+6
-1
python/paddle/fluid/tests/custom_runtime/test_custom_cpu_plugin.py
...ddle/fluid/tests/custom_runtime/test_custom_cpu_plugin.py
+6
-1
python/paddle/fluid/tests/custom_runtime/test_custom_cpu_profiler_plugin.py
...d/tests/custom_runtime/test_custom_cpu_profiler_plugin.py
+6
-1
python/paddle/fluid/tests/custom_runtime/test_fleet_launch_custom_device.sh
...d/tests/custom_runtime/test_fleet_launch_custom_device.sh
+5
-1
未找到文件。
python/paddle/fluid/tests/custom_runtime/CMakeLists.txt
浏览文件 @
ae6a8271
if
(
WITH_CUSTOM_DEVICE AND NOT WITH_GPU
)
set
(
PLUGIN_URL https://github.com/PaddlePaddle/PaddleCustomDevice.git
)
set
(
PLUGIN_TAG d5e5ac1d8e9f7588d4c2998bb3b5ffc66f65af2e
)
file
(
GLOB TEST_OPS
RELATIVE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
...
...
@@ -7,13 +10,18 @@ if(WITH_CUSTOM_DEVICE AND NOT WITH_GPU)
list
(
REMOVE_ITEM TEST_OPS test_collective_process_group_xccl
)
foreach
(
TEST_OP
${
TEST_OPS
}
)
py_test
(
${
TEST_OP
}
SRCS
${
TEST_OP
}
.py
)
py_test
(
${
TEST_OP
}
SRCS
${
TEST_OP
}
.py ENVS PLUGIN_URL=
${
PLUGIN_URL
}
PLUGIN_TAG=
${
PLUGIN_TAG
}
)
endforeach
()
bash_test_modules
(
test_fleet_launch_custom_device START_BASH
test_fleet_launch_custom_device.sh ENVS
PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
)
test_fleet_launch_custom_device
START_BASH
test_fleet_launch_custom_device.sh
ENVS
PADDLE_BINARY_DIR=
${
PADDLE_BINARY_DIR
}
PLUGIN_URL=
${
PLUGIN_URL
}
PLUGIN_TAG=
${
PLUGIN_TAG
}
)
set_tests_properties
(
test_custom_cpu_plugin PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_custom_cpu_profiler_plugin PROPERTIES TIMEOUT 120
)
...
...
python/paddle/fluid/tests/custom_runtime/test_collective_process_group_xccl.py
浏览文件 @
ae6a8271
...
...
@@ -136,7 +136,12 @@ class TestProcessGroup(TestMultipleCustomCPU):
def
setUp
(
self
):
# compile so and set to current path
cur_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
cmd
=
'rm -rf PaddleCustomDevice && git clone https://github.com/PaddlePaddle/PaddleCustomDevice.git && cd PaddleCustomDevice/backends/custom_cpu && mkdir build && cd build && cmake .. && make -j8'
cmd
=
'rm -rf PaddleCustomDevice
\
&& git clone {}
\
&& cd PaddleCustomDevice/backends/custom_cpu
\
&& git checkout {} -b dev
\
&& mkdir build && cd build && cmake .. && make -j8'
.
format
(
os
.
getenv
(
'PLUGIN_URL'
),
os
.
getenv
(
'PLUGIN_TAG'
))
os
.
system
(
cmd
)
# set environment for loading and registering compiled custom kernels
...
...
python/paddle/fluid/tests/custom_runtime/test_custom_cpu_plugin.py
浏览文件 @
ae6a8271
...
...
@@ -24,7 +24,12 @@ class TestCustomCPUPlugin(unittest.TestCase):
def
setUp
(
self
):
# compile so and set to current path
cur_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
cmd
=
'rm -rf PaddleCustomDevice && git clone https://github.com/PaddlePaddle/PaddleCustomDevice.git && cd PaddleCustomDevice/backends/custom_cpu && mkdir build && cd build && cmake .. && make -j8'
cmd
=
'rm -rf PaddleCustomDevice
\
&& git clone {}
\
&& cd PaddleCustomDevice/backends/custom_cpu
\
&& git checkout {} -b dev
\
&& mkdir build && cd build && cmake .. && make -j8'
.
format
(
os
.
getenv
(
'PLUGIN_URL'
),
os
.
getenv
(
'PLUGIN_TAG'
))
os
.
system
(
cmd
)
# set environment for loading and registering compiled custom kernels
...
...
python/paddle/fluid/tests/custom_runtime/test_custom_cpu_profiler_plugin.py
浏览文件 @
ae6a8271
...
...
@@ -24,7 +24,12 @@ class TestCustomCPUProfilerPlugin(unittest.TestCase):
def
setUp
(
self
):
# compile so and set to current path
cur_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
cmd
=
'rm -rf PaddleCustomDevice && git clone https://github.com/PaddlePaddle/PaddleCustomDevice.git && cd PaddleCustomDevice/backends/custom_cpu && mkdir build && cd build && cmake .. && make -j8'
cmd
=
'rm -rf PaddleCustomDevice
\
&& git clone {}
\
&& cd PaddleCustomDevice/backends/custom_cpu
\
&& git checkout {} -b dev
\
&& mkdir build && cd build && cmake .. && make -j8'
.
format
(
os
.
getenv
(
'PLUGIN_URL'
),
os
.
getenv
(
'PLUGIN_TAG'
))
os
.
system
(
cmd
)
# set environment for loading and registering compiled custom kernels
...
...
python/paddle/fluid/tests/custom_runtime/test_fleet_launch_custom_device.sh
浏览文件 @
ae6a8271
...
...
@@ -16,7 +16,11 @@
set
-e
rm
-rf
PaddleCustomDevice
&&
git clone https://github.com/PaddlePaddle/PaddleCustomDevice.git
&&
pushd
PaddleCustomDevice/backends/custom_cpu
&&
mkdir
build
&&
pushd
build
&&
cmake ..
&&
make
-j8
&&
popd
&&
popd
rm
-rf
PaddleCustomDevice
&&
\
git clone
${
PLUGIN_URL
}
\
&&
pushd
PaddleCustomDevice/backends/custom_cpu
\
&&
git checkout
${
PLUGIN_TAG
}
-b
dev
\
&&
mkdir
build
&&
pushd
build
&&
cmake ..
&&
make
-j8
&&
popd
&&
popd
echo
"begin test use custom_cpu"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录