Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
00280baa
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看板
提交
00280baa
编写于
2月 01, 2018
作者:
W
wanghaox
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/Paddle
into hard_example
上级
81905527
1c2b071a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
1 deletion
+37
-1
paddle/operators/feed_op.cc
paddle/operators/feed_op.cc
+5
-1
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+2
-0
paddle/scripts/docker/test.sh
paddle/scripts/docker/test.sh
+30
-0
未找到文件。
paddle/operators/feed_op.cc
浏览文件 @
00280baa
...
...
@@ -52,7 +52,11 @@ class FeedOp : public framework::OperatorBase {
platform
::
DeviceContextPool
&
pool
=
platform
::
DeviceContextPool
::
Instance
();
auto
&
dev_ctx
=
*
pool
.
Get
(
place
);
framework
::
Copy
(
feed_item
,
place
,
dev_ctx
,
out_item
);
if
(
platform
::
is_same_place
(
feed_item
.
place
(),
place
))
{
out_item
->
ShareDataWith
(
feed_item
);
}
else
{
framework
::
Copy
(
feed_item
,
place
,
dev_ctx
,
out_item
);
}
out_item
->
set_lod
(
feed_item
.
lod
());
}
};
...
...
paddle/scripts/docker/build.sh
浏览文件 @
00280baa
...
...
@@ -40,6 +40,7 @@ function cmake_gen() {
-DWITH_MKL=
${
WITH_MKL
:-
ON
}
-DWITH_AVX=
${
WITH_AVX
:-
OFF
}
-DWITH_GOLANG=
${
WITH_GOLANG
:-
ON
}
-DCUDA_ARCH_NAME=
${
CUDA_ARCH_NAME
:-
All
}
-DWITH_SWIG_PY=ON
-DWITH_C_API=
${
WITH_C_API
:-
OFF
}
-DWITH_PYTHON=
${
WITH_PYTHON
:-
ON
}
...
...
@@ -62,6 +63,7 @@ EOF
-DWITH_MKL
=
${
WITH_MKL
:-
ON
}
\
-DWITH_AVX
=
${
WITH_AVX
:-
OFF
}
\
-DWITH_GOLANG
=
${
WITH_GOLANG
:-
ON
}
\
-DCUDA_ARCH_NAME
=
${
CUDA_ARCH_NAME
:-
All
}
\
-DWITH_SWIG_PY
=
${
WITH_SWIG_PY
:-
ON
}
\
-DWITH_C_API
=
${
WITH_C_API
:-
OFF
}
\
-DWITH_PYTHON
=
${
WITH_PYTHON
:-
ON
}
\
...
...
paddle/scripts/docker/test.sh
0 → 100755
浏览文件 @
00280baa
#!/bin/bash
set
-e
# the number of process to run tests
NUM_PROC
=
6
# calculate and set the memory usage for each process
MEM_USAGE
=
$(
printf
"%.2f"
`
echo
"scale=5; 1.0 /
$NUM_PROC
"
| bc
`
)
export
FLAGS_fraction_of_gpu_memory_to_use
=
$MEM_USAGE
# get the CUDA device count
CUDA_DEVICE_COUNT
=
$(
nvidia-smi
-L
|
wc
-l
)
for
((
i
=
0
;
i <
$NUM_PROC
;
i++
))
;
do
cuda_list
=()
for
((
j
=
0
;
j <
$CUDA_DEVICE_COUNT
;
j++
))
;
do
s
=
$[
i+j]
n
=
$[
s%CUDA_DEVICE_COUNT]
if
[
$j
-eq
0
]
;
then
cuda_list
=(
"
$n
"
)
else
cuda_list
=
"
$cuda_list
,
$n
"
fi
done
echo
$cuda_list
# CUDA_VISIBLE_DEVICES http://acceleware.com/blog/cudavisibledevices-masking-gpus
# ctest -I https://cmake.org/cmake/help/v3.0/manual/ctest.1.html?highlight=ctest
env
CUDA_VISIBLE_DEVICES
=
$cuda_list
ctest
-I
$i
,,
$NUM_PROC
--output-on-failure
&
done
wait
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录