Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
ec2a3eb3
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ec2a3eb3
编写于
9月 10, 2016
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/master'
上级
b664ca03
674d69ce
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
55 addition
and
15 deletion
+55
-15
.travis.yml
.travis.yml
+1
-0
paddle/gserver/dataproviders/PyDataProvider2.cpp
paddle/gserver/dataproviders/PyDataProvider2.cpp
+7
-4
paddle/scripts/submit_local.sh.in
paddle/scripts/submit_local.sh.in
+35
-0
paddle/scripts/travis/build.sh
paddle/scripts/travis/build.sh
+1
-5
paddle/scripts/travis/common.sh
paddle/scripts/travis/common.sh
+5
-0
paddle/scripts/travis/make_install.sh
paddle/scripts/travis/make_install.sh
+5
-0
paddle/scripts/travis/unittest.sh
paddle/scripts/travis/unittest.sh
+1
-2
python/CMakeLists.txt
python/CMakeLists.txt
+0
-4
未找到文件。
.travis.yml
浏览文件 @
ec2a3eb3
...
...
@@ -29,6 +29,7 @@ before_install:
script
:
-
paddle/scripts/travis/build.sh
-
paddle/scripts/travis/unittest.sh
-
paddle/scripts/travis/make_install.sh
notifications
:
email
:
on_success
:
change
...
...
paddle/gserver/dataproviders/PyDataProvider2.cpp
浏览文件 @
ec2a3eb3
...
...
@@ -340,6 +340,7 @@ private:
size_t
additionalBatchSize
=
1
;
if
(
calcBatchSize_
)
{
PyGuard
guard
;
py
::
CallableHelper
calcBatchSize
(
this
->
calcBatchSize_
);
calcBatchSize
.
setArgsSize
(
1
);
calcBatchSize
.
getArgs
().
set
(
0
,
data
);
...
...
@@ -513,6 +514,7 @@ public:
}
{
if
(
calcBatchSize_
)
{
// custom calc batch size.
PyGuard
guard
;
Py_INCREF
(
data
.
back
().
get
());
py
::
CallableHelper
calcBatchSize
(
calcBatchSize_
);
calcBatchSize
.
setArgsSize
(
1
);
...
...
@@ -575,6 +577,11 @@ public:
scanners
[
i
]
->
finishFill
(
inArgs
[
i
]);
}
{
PyGuard
g
;
cache_
->
drop
(
&
data
);
}
DBG
<<
"Reading CPU Batch Done."
;
if
(
useGpu_
)
{
...
...
@@ -592,10 +599,6 @@ public:
*
batch
=
cpuBatch
;
}
{
PyGuard
g
;
cache_
->
drop
(
&
data
);
}
return
bsize
;
}
};
...
...
paddle/scripts/submit_local.sh.in
浏览文件 @
ec2a3eb3
...
...
@@ -43,6 +43,41 @@ fi
export
PYTHONPATH
=
${
PWD
}
:
${
PYTHONPATH
}
# Check python lib installed or not.
pip
--help
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"pip should be installed to run paddle."
exit
1
fi
INSTALLED_VERSION
=
`
pip freeze 2>/dev/null |
grep
'^paddle'
|
sed
's/.*==//g'
`
if
[
-z
${
INSTALLED_VERSION
}
]
;
then
INSTALLED_VERSION
=
"0.0.0"
# not installed
fi
cat
<<
EOF
| python -
from distutils.version import LooseVersion
import sys
if LooseVersion("
${
INSTALLED_VERSION
}
") < LooseVersion("@PADDLE_VERSION@"):
sys.exit(1)
else:
sys.exit(0)
EOF
if
[
$?
-eq
1
]
;
then
# Older version installed, or not installed at all
echo
"First time run paddle, need to install some python dependencies."
BASEDIR
=
$(
dirname
"
$0
"
)
pip
install
${
BASEDIR
}
/../opt/paddle/share/wheels/
*
.whl
if
[
$?
-ne
0
]
;
then
echo
"pip install wheels failed. "
echo
"Please use 'sudo paddle' at the first time you use PaddlePaddle"
echo
"PaddlePaddle will install some python dependencies automatically."
exit
1
fi
echo
"Python dependencies are installed."
fi
case
"
$1
"
in
"train"
)
${
DEBUGGER
}
$MYDIR
/../opt/paddle/bin/paddle_trainer
${
@
:2
}
...
...
paddle/scripts/travis/build.sh
浏览文件 @
ec2a3eb3
#!/bin/bash
cd
`
dirname
$0
`
cd
../../../
set
-e
mkdir
build
cd
build
source
./common.sh
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-DWITH_GPU
=
OFF
-DWITH_DOC
=
OFF
-DWITH_TESTING
=
ON
-DON_TRAVIS
=
ON
make
-j
`
nproc
`
paddle/scripts/travis/common.sh
0 → 100755
浏览文件 @
ec2a3eb3
#!/bin/bash
set
-e
mkdir
-p
../../../build
cd
../../../build
paddle/scripts/travis/make_install.sh
0 → 100755
浏览文件 @
ec2a3eb3
#!/bin/bash
cd
`
dirname
$0
`
source
./common.sh
sudo
make
install
sudo
paddle version
paddle/scripts/travis/unittest.sh
浏览文件 @
ec2a3eb3
#!/bin/bash
set
-e
cd
`
dirname
$0
`
cd
../../../build
source
./common.sh
env
CTEST_OUTPUT_ON_FAILURE
=
1 make
test
ARGS
=
"-j
`
nproc
`
"
python/CMakeLists.txt
浏览文件 @
ec2a3eb3
...
...
@@ -22,10 +22,6 @@ find_python_module(pip REQUIRED)
find_python_module
(
wheel REQUIRED
)
find_python_module
(
google.protobuf REQUIRED
)
install
(
CODE
"execute_process(COMMAND
${
PYTHON_EXECUTABLE
}
setup.py install -f
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)"
)
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
DESTINATION opt/paddle/share/wheels
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录