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
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class Communicator {

static Communicator *GetInstance() { return communicator_.get(); }

static std::shared_ptr<Communicator> GetInstantcePtr() {
static std::shared_ptr<Communicator> GetInstancePtr() {
return communicator_;
}

Expand Down Expand Up @@ -528,7 +528,7 @@ class HalfAsyncCommunicator : public AsyncCommunicator {
: AsyncCommunicator(envs) {}

void InitEnvs() {
// enfore to recv after send
// enforce to recv after send
independent_recv_ = false;
min_send_grad_num_before_recv_ = 0;
thread_pool_size_ = std::stoi(envs.at("communicator_thread_pool_size"));
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/distributed/ps/service/graph_brpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ int32_t GraphBrpcService::Barrier(Table *table,
if (request.params_size() < 1) {
set_response_code(response,
-1,
"PsRequestMessage.params is requeired at "
"PsRequestMessage.params is required at "
"least 1 for num of sparse_key");
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/pybind/auto_parallel_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,8 @@ void BindAutoParallel(py::module *m) {
py::return_value_policy::reference);

// TODO(liuzhenhai): DistributedMapper is not used for now, but
// dist_mapper_test need the symbols forch DistributedMapper to be linked,
// remove it latter
// dist_mapper_test need the symbols touch DistributedMapper to be linked,
// remove it later
m->def("touch_dist_mapper", []() {
DistributedMapper mapper;
return mapper.to_string();
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/pybind/communicator_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void BindCommunicator(py::module* m) {
"unsupported communicator MODE"));
}

return Communicator::GetInstantcePtr();
return Communicator::GetInstancePtr();
}))
.def("stop", &Communicator::Stop)
.def("start", &Communicator::Start)
Expand All @@ -114,7 +114,7 @@ void BindCommunicator(py::module* m) {

void BindLargeScaleKV(py::module* m) {
py::class_<LargeScaleKV, std::shared_ptr<LargeScaleKV>>(*m, "LargeScaleKV")
.def(py::init([]() { return LargeScaleKV::GetInstantcePtr(); }))
.def(py::init([]() { return LargeScaleKV::GetInstancePtr(); }))
.def("load",
[](LargeScaleKV& self,
const std::string& table_name,
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

/*
This file is adpated from
This file is adapted from
https://github.com/pybind/pybind11/blob/master/include/pybind11/complex.h.
The original license is kept as-is:

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/control_flow_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Value BuildHasElementsOp(Operation& fwd_op) { // NOLINT
PADDLE_ENFORCE_EQ(push_op.container().use_empty(),
false,
phi::errors::InvalidArgument(
"The last container in foward while op must used "
"The last container in forward while op must used "
"after construct while_grad op"));
break;
}
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/cuda_streams_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void BindCudaStream(py::module *m_ptr) {
return reinterpret_cast<std::uintptr_t>(self.raw_stream());
},
R"DOC(
retrun the raw cuda stream of type cudaStream_t as type int.
return the raw cuda stream of type cudaStream_t as type int.

Examples:
.. code-block:: python
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/pybind/eager_functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static PyObject* eager_api_run_partial_grad(PyObject* self,
only_inputs,
allow_unused,
no_grad_vars);
VLOG(4) << " in eager_api_run_partial_grad, after runing egr::Grad";
VLOG(4) << " in eager_api_run_partial_grad, after running egr::Grad";
}
return ToPyObject(result, true /* return_py_none_if_not_initialize */);
EAGER_CATCH_AND_THROW_RETURN_NULL
Expand Down Expand Up @@ -1085,7 +1085,7 @@ static PyObject* eager_api_async_read(PyObject* self,
PADDLE_ENFORCE_EQ(offset_tensor.numel(),
count_tensor.numel(),
platform::errors::InvalidArgument(
"`offset` and `count` tensor size dismatch."));
"`offset` and `count` tensor size mismatch."));
auto* offset_data = offset_tensor.data<int64_t>();
auto* count_data = count_tensor.data<int64_t>();
for (int64_t i = 0; i < count_tensor.numel(); i++) {
Expand Down Expand Up @@ -1214,7 +1214,7 @@ static PyObject* eager_api_async_write(PyObject* self,
PADDLE_ENFORCE_EQ(offset_tensor.numel(),
count_tensor.numel(),
platform::errors::InvalidArgument(
"`offset` and `count` tensor size dismatch."));
"`offset` and `count` tensor size mismatch."));
PADDLE_ENFORCE_EQ(src_tensor.dims().size(),
dst_tensor->dims().size(),
platform::errors::InvalidArgument(
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/pybind/eager_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ paddle::Tensor CreateTensorFromOpResult(const pir::OpResult& op_result) {
return tensor;
}

PyObject* GetEmpytyTensorsWithOpResult(PyObject* self, PyObject* args) {
PyObject* GetEmptyTensorsWithOpResult(PyObject* self, PyObject* args) {
std::vector<paddle::Tensor> result;
std::unordered_map<pir::OpResult, paddle::Tensor> out_tensor_map;

Expand Down Expand Up @@ -2764,9 +2764,9 @@ static PyMethodDef EagerUtilMethods[] = {
METH_VARARGS,
"GetEmptyTensorsWithVarDesc"},
{"create_empty_tensors_with_op_results",
(PyCFunction)(void (*)(void))GetEmpytyTensorsWithOpResult,
(PyCFunction)(void (*)(void))GetEmptyTensorsWithOpResult,
METH_VARARGS,
"GetEmpytyTensorsWithOpResult."},
"GetEmptyTensorsWithOpResult."},
{"set_static_op_arg_pre_cast_hook",
(PyCFunction)SetStaticOpArgPreCastHook,
METH_O,
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/pybind/eager_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ std::vector<paddle::Tensor> GetTensorListFromPyObject(PyObject* obj,
bool allow_none = false);
paddle::Tensor& UnSafeGetTensorFromPyObject(PyObject* obj);

PyObject* GetEmpytyTensorsWithVarDesc(PyObject* self, PyObject* args);
PyObject* GetEmptyTensorsWithVarDesc(PyObject* self, PyObject* args);

PyObject* GetEmpytyTensorsWithOpResult(PyObject* self, PyObject* args);
PyObject* GetEmptyTensorsWithOpResult(PyObject* self, PyObject* args);

// end of Slice related methods

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/fleet_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void BindDistCommunicator(py::module* m) {
PADDLE_THROW(platform::errors::InvalidArgument(
"unsupported communicator MODE"));
}
return Communicator::GetInstantcePtr();
return Communicator::GetInstancePtr();
}))
.def("stop", &Communicator::Stop)
.def("start", &Communicator::Start)
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/sub_graph/sub_graph_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ void SubGraphChecker::RemoveFetchOp(pir::Block* block) {
void SubGraphChecker::InitInputs(const std::vector<pir::Value>& input_values,
pir::Block* block,
paddle::framework::Scope* scope) {
// build a proram, init data and set parameter to scope
// build a program, init data and set parameter to scope
::pir::IrContext* ctx = ::pir::IrContext::Instance();
ctx->GetOrRegisterDialect<paddle::dialect::OperatorDialect>();

Expand Down