Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions paddle/fluid/framework/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License. */
#include <algorithm>
#include <stdexcept>
#include <string>
#include <vector>

#include "paddle/fluid/framework/init.h"
#include "paddle/fluid/framework/operator.h"
Expand All @@ -28,7 +29,7 @@ namespace framework {
std::once_flag gflags_init_flag;
std::once_flag p2p_init_flag;

void InitGflags(std::vector<std::string> &argv) {
void InitGflags(std::vector<std::string> argv) {
std::call_once(gflags_init_flag, [&]() {
int argc = argv.size();
char **arr = new char *[argv.size()];
Expand Down Expand Up @@ -65,7 +66,7 @@ void InitP2P(int count) {
}

void InitDevices(bool init_p2p) {
/*Init all avaiable devices by default */
/*Init all available devices by default */

std::vector<platform::Place> places;
places.emplace_back(platform::CPUPlace());
Expand Down
6 changes: 4 additions & 2 deletions paddle/fluid/framework/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ 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 <mutex>
#include <mutex> // NOLINT
#include <string>
#include <vector>

#include "gflags/gflags.h"
#include "glog/logging.h"

namespace paddle {
namespace framework {

void InitGflags(std::vector<std::string> &argv);
void InitGflags(std::vector<std::string> argv);

void InitGLOG(const std::string &prog_name);

Expand Down
5 changes: 3 additions & 2 deletions paddle/fluid/framework/library_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License. */

#pragma once
#include <cctype>
#include <string>

namespace paddle {
namespace framework {
Expand Down Expand Up @@ -67,5 +68,5 @@ inline std::ostream& operator<<(std::ostream& out, LibraryType l) {
return out;
}

} // namespace
} // framework
} // namespace framework
} // namespace paddle