Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
2016f922
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看板
提交
2016f922
编写于
12月 22, 2016
作者:
Y
Yu Yang
提交者:
GitHub
12月 22, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request
#989
from gangliao/utils_dep
Remove utils/CommandLineParser.h
上级
4490bf96
7e255127
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
31 addition
and
75 deletion
+31
-75
paddle/cuda/src/hl_cuda_cudnn.cc
paddle/cuda/src/hl_cuda_cudnn.cc
+1
-1
paddle/cuda/src/hl_dso_loader.cc
paddle/cuda/src/hl_dso_loader.cc
+1
-1
paddle/gserver/layers/RecurrentLayer.cpp
paddle/gserver/layers/RecurrentLayer.cpp
+1
-1
paddle/gserver/tests/TestUtil.cpp
paddle/gserver/tests/TestUtil.cpp
+1
-2
paddle/math/SparseRowMatrix.h
paddle/math/SparseRowMatrix.h
+1
-1
paddle/parameter/Parameter.cpp
paddle/parameter/Parameter.cpp
+1
-1
paddle/pserver/BaseClient.cpp
paddle/pserver/BaseClient.cpp
+1
-1
paddle/utils/CommandLineParser.cpp
paddle/utils/CommandLineParser.cpp
+0
-32
paddle/utils/CommandLineParser.h
paddle/utils/CommandLineParser.h
+0
-22
paddle/utils/CustomStackTrace.cpp
paddle/utils/CustomStackTrace.cpp
+1
-1
paddle/utils/Flags.h
paddle/utils/Flags.h
+1
-1
paddle/utils/ThreadLocal.cpp
paddle/utils/ThreadLocal.cpp
+3
-1
paddle/utils/Util.cpp
paddle/utils/Util.cpp
+8
-3
paddle/utils/Util.h
paddle/utils/Util.h
+0
-1
paddle/utils/tests/test_CustomStackTrace.cpp
paddle/utils/tests/test_CustomStackTrace.cpp
+3
-2
paddle/utils/tests/test_SpinLock.cpp
paddle/utils/tests/test_SpinLock.cpp
+4
-2
paddle/utils/tests/test_ThreadBarrier.cpp
paddle/utils/tests/test_ThreadBarrier.cpp
+4
-2
未找到文件。
paddle/cuda/src/hl_cuda_cudnn.cc
浏览文件 @
2016f922
...
...
@@ -14,11 +14,11 @@ limitations under the License. */
#include "hl_cuda_cudnn.h"
#include <cudnn.h>
#include <gflags/gflags.h>
#include <mutex>
#include "hl_cuda_cudnn.ph"
#include "hl_dso_loader.h"
#include "hl_thread.ph"
#include "paddle/utils/CommandLineParser.h"
#include "paddle/utils/Logging.h"
DEFINE_int32
(
cudnn_conv_workspace_limit_in_mb
,
...
...
paddle/cuda/src/hl_dso_loader.cc
浏览文件 @
2016f922
...
...
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "hl_dso_loader.h"
#include
"paddle/utils/CommandLineParser.h"
#include
<gflags/gflags.h>
#include "paddle/utils/Logging.h"
DEFINE_string
(
cudnn_dir
,
...
...
paddle/gserver/layers/RecurrentLayer.cpp
浏览文件 @
2016f922
...
...
@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <gflags/gflags.h>
#include "Layer.h"
#include "SequenceToBatch.h"
#include "paddle/utils/CommandLineParser.h"
#include "paddle/utils/Stat.h"
DEFINE_bool
(
rnn_use_batch
,
false
,
"Using the batch method for calculation."
);
...
...
paddle/gserver/tests/TestUtil.cpp
浏览文件 @
2016f922
...
...
@@ -13,9 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "TestUtil.h"
#include <gflags/gflags.h>
#include "paddle/math/SparseMatrix.h"
#include "paddle/utils/CommandLineParser.h"
DEFINE_int32
(
fixed_seq_length
,
0
,
"Produce some sequence of fixed length"
);
...
...
paddle/math/SparseRowMatrix.h
浏览文件 @
2016f922
...
...
@@ -14,10 +14,10 @@ limitations under the License. */
#pragma once
#include <gflags/gflags.h>
#include <string.h>
#include <algorithm>
#include "Matrix.h"
#include "paddle/utils/CommandLineParser.h"
#include "paddle/utils/Util.h"
DECLARE_bool
(
allow_inefficient_sparse_update
);
...
...
paddle/parameter/Parameter.cpp
浏览文件 @
2016f922
...
...
@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "Parameter.h"
#include <gflags/gflags.h>
#include <fstream>
#include "AverageOptimizer.h"
#include "FirstOrderOptimizer.h"
...
...
@@ -23,7 +24,6 @@ limitations under the License. */
#include "paddle/math/CpuSparseMatrix.h"
#include "paddle/math/MathUtils.h"
#include "paddle/math/SparseRowMatrix.h"
#include "paddle/utils/CommandLineParser.h"
#include "paddle/utils/Logging.h"
DEFINE_int32
(
enable_grad_share
,
...
...
paddle/pserver/BaseClient.cpp
浏览文件 @
2016f922
...
...
@@ -13,9 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "BaseClient.h"
#include <gflags/gflags.h>
#include <string.h>
#include <vector>
#include "paddle/utils/CommandLineParser.h"
#include "paddle/utils/Stat.h"
DECLARE_string
(
pservers
);
...
...
paddle/utils/CommandLineParser.cpp
已删除
100644 → 0
浏览文件 @
4490bf96
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "CommandLineParser.h"
namespace
paddle
{
#ifndef GFLAGS_NS
#define GFLAGS_NS google
#endif
namespace
gflags_ns
=
GFLAGS_NS
;
void
ParseCommandLineFlags
(
int
*
argc
,
char
**
argv
,
bool
withHelp
)
{
if
(
withHelp
)
{
gflags_ns
::
ParseCommandLineFlags
(
argc
,
&
argv
,
true
);
}
else
{
gflags_ns
::
ParseCommandLineNonHelpFlags
(
argc
,
&
argv
,
true
);
}
}
}
// namespace paddle
paddle/utils/CommandLineParser.h
已删除
100644 → 0
浏览文件 @
4490bf96
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include <gflags/gflags.h>
namespace
paddle
{
void
ParseCommandLineFlags
(
int
*
argc
,
char
**
argv
,
bool
withHelp
=
true
);
}
// namespace paddle
paddle/utils/CustomStackTrace.cpp
浏览文件 @
2016f922
...
...
@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "CustomStackTrace.h"
#include <gflags/gflags.h>
#include <iostream>
#include "CommandLineParser.h"
DEFINE_bool
(
layer_stack_error_only_current_thread
,
...
...
paddle/utils/Flags.h
浏览文件 @
2016f922
...
...
@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include
"CommandLineParser.h"
#include
<gflags/gflags.h>
DECLARE_bool
(
parallel_nn
);
DECLARE_int32
(
async_count
);
...
...
paddle/utils/ThreadLocal.cpp
浏览文件 @
2016f922
...
...
@@ -13,7 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "ThreadLocal.h"
#include "CommandLineParser.h"
#include <gflags/gflags.h>
#include "Util.h"
DEFINE_bool
(
thread_local_rand_use_global_seed
,
...
...
paddle/utils/Util.cpp
浏览文件 @
2016f922
...
...
@@ -24,10 +24,10 @@ limitations under the License. */
#include <fstream>
#include <mutex>
#include
"paddle/utils/Logging.h"
#include
<gflags/gflags.h>
#include "CommandLineParser.h"
#include "CustomStackTrace.h"
#include "Logging.h"
#include "StringUtil.h"
#include "Thread.h"
#include "ThreadLocal.h"
...
...
@@ -152,7 +152,12 @@ void initMain(int argc, char** argv) {
line
+=
' '
;
}
LOG
(
INFO
)
<<
"commandline: "
<<
line
;
ParseCommandLineFlags
(
&
argc
,
argv
,
true
);
#ifndef GFLAGS_GFLAGS_H_
namespace
gflags
=
google
;
#endif
gflags
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
CHECK_EQ
(
argc
,
1
)
<<
"Unknown commandline argument: "
<<
argv
[
1
];
installProfilerSwitch
();
...
...
paddle/utils/Util.h
浏览文件 @
2016f922
...
...
@@ -26,7 +26,6 @@ limitations under the License. */
#include <unordered_map>
#include <vector>
#include "CommandLineParser.h"
#include "DisableCopy.h"
#include "Logging.h"
#include "TrainerConfig.pb.h"
...
...
paddle/utils/tests/test_CustomStackTrace.cpp
浏览文件 @
2016f922
...
...
@@ -12,10 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <gtest/gtest.h>
#include <chrono>
#include "paddle/utils/CommandLineParser.h"
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include "paddle/utils/CustomStackTrace.h"
#include "paddle/utils/Locks.h"
#include "paddle/utils/Util.h"
...
...
paddle/utils/tests/test_SpinLock.cpp
浏览文件 @
2016f922
...
...
@@ -12,9 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <gtest/gtest.h>
#include <vector>
#include "paddle/utils/CommandLineParser.h"
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include "paddle/utils/Locks.h"
#include "paddle/utils/Logging.h"
#include "paddle/utils/Util.h"
...
...
paddle/utils/tests/test_ThreadBarrier.cpp
浏览文件 @
2016f922
...
...
@@ -12,10 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <gtest/gtest.h>
#include <set>
#include <vector>
#include "paddle/utils/CommandLineParser.h"
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include "paddle/utils/Locks.h"
#include "paddle/utils/Logging.h"
#include "paddle/utils/Util.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录