Skip to content

Commit

Permalink
Fix some typos(ingest_externel_file, etc) (PaddlePaddle#62040)
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc committed Feb 26, 2024
1 parent 5508f55 commit 67bd48f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ReplicatedSPMDRule::InferForward(const std::vector<DistTensorSpec>& input_specs,
}

// TODO(ljz): we need to know num of output and size of each output before
// generate the excat replicated dist tensor attr for the current op.
// generate the exact replicated dist tensor attr for the current op.
// here we just assume that only one output tensor and has the same size as
// the first input tensor.
return {intput_dist_attrs, {ReplicatedOnMesh(input_specs[0].dist_attr())}};
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/distributed/ps/service/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class PsBaseService : public PsService {
const char *err_msg) {
response.set_err_msg(err_msg);
response.set_err_code(err_code);
LOG(WARNING) << "Resonse err_code:" << err_code << " msg:" << err_msg;
LOG(WARNING) << "Response err_code:" << err_code << " msg:" << err_msg;
}

virtual int32_t Initialize() = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class RocksDBHandler {

Uint64Comparator* get_comparator() { return &_comparator; }

int ingest_externel_file(int id,
int ingest_external_file(int id,
const std::vector<std::string>& sst_filelist) {
rocksdb::IngestExternalFileOptions ifo;
ifo.move_files = true;
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/distributed/ps/table/ssd_sparse_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ int32_t SSDSparseTable::LoadWithBinary(const std::string& path, int param) {
auto sst_filelist = _afs_client.list(::paddle::string::format_string(
"%s_%d/part-*", FLAGS_rocksdb_path.c_str(), shard_idx));
if (!sst_filelist.empty()) {
int ret = _db->ingest_externel_file(shard_idx, sst_filelist);
int ret = _db->ingest_external_file(shard_idx, sst_filelist);
if (ret) {
VLOG(0) << "ingest file failed";
abort();
Expand Down Expand Up @@ -3038,7 +3038,7 @@ int32_t SSDSparseTable::CacheTable(uint16_t pass_id) {
}
VLOG(0) << "write sst_file shard " << shard_id << ": "
<< butil::gettimeofday_ms() - show_begin << " ms";
int ret = _db->ingest_externel_file(shard_id, {filename});
int ret = _db->ingest_external_file(shard_id, {filename});
if (ret) {
VLOG(0) << "ingest file failed"
<< ", " << status.getState();
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/distributed/ps/wrapper/fleet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,8 @@ std::default_random_engine& FleetWrapper::LocalRandomEngine() {
clock_gettime(CLOCK_REALTIME, &tp);
double cur_time = tp.tv_sec + tp.tv_nsec * 1e-9;
static std::atomic<uint64_t> x(0);
std::seed_seq sseq = {x++, x++, x++, (uint64_t)(cur_time * 1000)};
engine.seed(sseq);
std::seed_seq s_seq = {x++, x++, x++, (uint64_t)(cur_time * 1000)};
engine.seed(s_seq);
}
};
thread_local engine_wrapper_t r;
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/distributed/ps/wrapper/fleet.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class FleetWrapper {

std::string GetDistDesc() const {
CHECK(is_initialized_ == true)
<< "fleetwrapper should be initialized first!!!";
<< "FleetWrapper should be initialized first!!!";
return dist_desc_;
}

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/distributed/test/graph_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void RunBrpcPushSparse() {
// auto ph_host2 = paddle::distributed::PSHost(ip2, port2, 1);
// host_sign_list_.push_back(ph_host2.SerializeToString());
// // test-end
// // Srart Server
// // Start Server
// std::thread* server_thread = new std::thread(RunServer);
// std::thread* server_thread2 = new std::thread(RunServer2);
// sleep(1);
Expand Down

0 comments on commit 67bd48f

Please sign in to comment.