fix typo word (#22784)

revert-22710-feature/integrated_ps_api
tianshuo78520a 5 years ago committed by GitHub
parent ebc7ffc300
commit 433cef03e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,7 +48,7 @@ if(WIN32)
SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@") SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")
# set defination for the dll export # set definition for the dll export
if (NOT MSVC) if (NOT MSVC)
message(FATAL "Windows build only support msvc. Which was binded by the nvcc compiler of NVIDIA.") message(FATAL "Windows build only support msvc. Which was binded by the nvcc compiler of NVIDIA.")
endif(NOT MSVC) endif(NOT MSVC)

@ -174,7 +174,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.5.2")
set(SHALLOW_CLONE "GIT_SHALLOW TRUE") # adds --depth=1 arg to git clone of External_Projects set(SHALLOW_CLONE "GIT_SHALLOW TRUE") # adds --depth=1 arg to git clone of External_Projects
endif() endif()
########################### include third_party accoring to flags ############################### ########################### include third_party according to flags ###############################
include(external/zlib) # download, build, install zlib include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog include(external/glog) # download, build, install glog

@ -857,7 +857,7 @@ int DistSSAGraphBuilder::CreateRPCOp(ir::Graph *result, ir::Node *node) const {
op_dev_id = GetVarDeviceID(node->inputs[0]->Name()); op_dev_id = GetVarDeviceID(node->inputs[0]->Name());
PADDLE_ENFORCE(!ir::IsControlDepVar(*node->inputs[0]), PADDLE_ENFORCE(!ir::IsControlDepVar(*node->inputs[0]),
"This hack no longer holds, please fix."); "This hack no longer holds, please fix.");
// the variable name which contains .block means it was splited by // the variable name which contains .block means it was split by
// split_byref op // split_byref op
if (strategy_.reduce_ == if (strategy_.reduce_ ==
details::BuildStrategy::ReduceStrategy::kAllReduce && details::BuildStrategy::ReduceStrategy::kAllReduce &&

@ -990,7 +990,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope,
} }
if (!transfered_inplace_vars.empty()) { if (!transfered_inplace_vars.empty()) {
// there is inplace variable has been transfered. // there is inplace variable has been transferred.
TransferInplaceVarsBack(scope, transfered_inplace_vars, *transfer_scope); TransferInplaceVarsBack(scope, transfered_inplace_vars, *transfer_scope);
} }
if (FLAGS_enable_unused_var_check) { if (FLAGS_enable_unused_var_check) {

@ -517,7 +517,8 @@ class OperatorWithKernel : public OperatorBase {
RuntimeContext* runtime_ctx) const; RuntimeContext* runtime_ctx) const;
/** /**
* Transfer data from scope to a transfered scope. If there is no data need to * Transfer data from scope to a transferred scope. If there is no data need
* to
* be tranfered, it returns nullptr. * be tranfered, it returns nullptr.
* *
* * transfered_inplace_vars is a output vector. * * transfered_inplace_vars is a output vector.

@ -87,18 +87,18 @@ class ParallelExecutorPrivate {
inline bool HasGarbageCollectors() const { return !gcs_.empty(); } inline bool HasGarbageCollectors() const { return !gcs_.empty(); }
/** /**
* NOTE(zengjinle): the feeded variables of users should not be reused, * NOTE(zengjinle): the fed variables of users should not be reused,
* because users may feed them into another network. Changing the feeded * because users may feed them into another network. Changing the fed
* variables that users can visit may cause calculation wrong, which is * variables that users can visit may cause calculation wrong, which is
* a very subtle bug when traning networks. However, these variables * a very subtle bug when traning networks. However, these variables
* can be garbage collected. * can be garbage collected.
* *
* ParallelExecutor provides 2 methods to feed variables: * ParallelExecutor provides 2 methods to feed variables:
* *
* - FeedTensorsIntoLocalScopes: this method would share memory of feeded * - FeedTensorsIntoLocalScopes: this method would share memory of fed
* variables, so we have to skip these. * variables, so we have to skip these.
* *
* - FeedAndSplitTensorIntoLocalScopes: this method would copy data of feeded * - FeedAndSplitTensorIntoLocalScopes: this method would copy data of fed
* variables, so we do not need to skip * variables, so we do not need to skip
* them. * them.
*/ */

@ -53,10 +53,10 @@ class ReaderBase {
// they are readers just before read op. // they are readers just before read op.
std::unordered_set<ReaderBase*> GetEndPoints(); std::unordered_set<ReaderBase*> GetEndPoints();
// Returns the shapes of the feeded variables // Returns the shapes of the fed variables
const std::vector<DDim>& Shapes() const { return shapes_; } const std::vector<DDim>& Shapes() const { return shapes_; }
// Returns the dtypes of the feeded variables // Returns the dtypes of the fed variables
const std::vector<proto::VarType::Type>& VarTypes() const { const std::vector<proto::VarType::Type>& VarTypes() const {
return var_types_; return var_types_;
} }
@ -80,13 +80,13 @@ class ReaderBase {
mutable std::mutex mu_; mutable std::mutex mu_;
// The shapes of the feeded variables. // The shapes of the fed variables.
std::vector<DDim> shapes_; std::vector<DDim> shapes_;
// The dtypes of the feeded variables. // The dtypes of the fed variables.
std::vector<proto::VarType::Type> var_types_; std::vector<proto::VarType::Type> var_types_;
// Whether to check the shape and dtype of feeded variables. // Whether to check the shape and dtype of fed variables.
// For Backward compatibility, variables created by old API fluid.layers.data // For Backward compatibility, variables created by old API fluid.layers.data
// doesn't check shape but fluid.data checks. // doesn't check shape but fluid.data checks.
std::vector<bool> need_check_feed_; std::vector<bool> need_check_feed_;

@ -210,7 +210,7 @@ TEST(test_prepare_op, test_prepare_data_same_place) {
attr_map); attr_map);
framework::RuntimeContext ctx = PrepareRuntimeContext(ins, outs); framework::RuntimeContext ctx = PrepareRuntimeContext(ins, outs);
// test if it never transfered on GPU place // test if it never transferred on GPU place
PreparedOp prepared_op = PreparedOp::Prepare( PreparedOp prepared_op = PreparedOp::Prepare(
ins, outs, dynamic_cast<framework::OperatorWithKernel&>(*op), cpu_place, ins, outs, dynamic_cast<framework::OperatorWithKernel&>(*op), cpu_place,
&attr_map); &attr_map);

@ -14,7 +14,7 @@
# #
if(WITH_TESTING) if(WITH_TESTING)
include(tests/test.cmake) # some generic cmake funtion for inference include(tests/test.cmake) # some generic cmake function for inference
endif() endif()
# TODO(panyx0718): Should this be called paddle_fluid_inference_api_internal? # TODO(panyx0718): Should this be called paddle_fluid_inference_api_internal?

@ -12,7 +12,7 @@ There are several demos:
- Each line contains a single record - Each line contains a single record
- Each record's format is - Each record's format is
``` ```
<space splitted floats as data>\t<space splitted ints as shape> <space split floats as data>\t<space split ints as shape>
``` ```
To build and execute the demos, simply run To build and execute the demos, simply run

@ -23,10 +23,9 @@ limitations under the License. */
DECLARE_double(fraction_of_gpu_memory_to_use); DECLARE_double(fraction_of_gpu_memory_to_use);
DEFINE_string(modeldir, "", "Directory of the inference model."); DEFINE_string(modeldir, "", "Directory of the inference model.");
DEFINE_string(refer, "", "path to reference result for comparison."); DEFINE_string(refer, "", "path to reference result for comparison.");
DEFINE_string( DEFINE_string(data, "",
data, "", "path of data; each line is a record, format is "
"path of data; each line is a record, format is " "'<space split floats as data>\t<space split ints as shape'");
"'<space splitted floats as data>\t<space splitted ints as shape'");
namespace paddle { namespace paddle {
namespace demo { namespace demo {

@ -25,10 +25,9 @@ DECLARE_double(fraction_of_gpu_memory_to_use);
#endif #endif
DEFINE_string(modeldir, "", "Directory of the inference model."); DEFINE_string(modeldir, "", "Directory of the inference model.");
DEFINE_string(refer, "", "path to reference result for comparison."); DEFINE_string(refer, "", "path to reference result for comparison.");
DEFINE_string( DEFINE_string(data, "",
data, "", "path of data; each line is a record, format is "
"path of data; each line is a record, format is " "'<space split floats as data>\t<space split ints as shape'");
"'<space splitted floats as data>\t<space splitted ints as shape'");
DEFINE_bool(use_gpu, false, "Whether use gpu."); DEFINE_bool(use_gpu, false, "Whether use gpu.");
#ifdef PADDLE_WITH_SHARED_LIB #ifdef PADDLE_WITH_SHARED_LIB
DECLARE_bool(profile); DECLARE_bool(profile);

@ -52,7 +52,7 @@ class BeamSearchOpMaker : public framework::OpProtoAndCheckerMaker {
"A LoDTensor containing the accumulated scores corresponding to " "A LoDTensor containing the accumulated scores corresponding to "
"Output(selected_ids)."); "Output(selected_ids).");
AddOutput("parent_idx", AddOutput("parent_idx",
"A Tensor preserving the selected_ids' parent indice in pre_ids.") "A Tensor preserving the selected_ids' parent index in pre_ids.")
.AsDispensable(); .AsDispensable();
// Attributes stored in AttributeMap // Attributes stored in AttributeMap

@ -119,7 +119,7 @@ class CudnnLSTMOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault(0.0); .SetDefault(0.0);
AddAttr<bool>("is_bidirec", AddAttr<bool>("is_bidirec",
"is_bidirec" "is_bidirec"
"if it is bidirection rnn" "if it is bidirectional rnn"
"The will affect the shape of the Out, last_h, and last_c") "The will affect the shape of the Out, last_h, and last_c")
.SetDefault(false); .SetDefault(false);
AddAttr<int>("input_size", "input size ot the Input Tensor").SetDefault(10); AddAttr<int>("input_size", "input size ot the Input Tensor").SetDefault(10);

@ -35,7 +35,7 @@ class DensityPriorBoxOp : public framework::OperatorWithKernel {
platform::errors::InvalidArgument( platform::errors::InvalidArgument(
"The input tensor Input's height" "The input tensor Input's height"
"of DensityPriorBoxOp should be smaller than input tensor Image's" "of DensityPriorBoxOp should be smaller than input tensor Image's"
"hight. But received Input's height = %d, Image's height = %d", "height. But received Input's height = %d, Image's height = %d",
input_dims[2], image_dims[2])); input_dims[2], image_dims[2]));
PADDLE_ENFORCE_LT( PADDLE_ENFORCE_LT(

@ -543,7 +543,7 @@ std::unordered_set<int64_t> GeoSgdCommunicator::SparseIdsMerge(
const std::string &splited_var_name) { const std::string &splited_var_name) {
// every batch has some sparse id, merge them into one unoredered_set // every batch has some sparse id, merge them into one unoredered_set
VLOG(4) << "Sparse Ids merge var: " << var_name VLOG(4) << "Sparse Ids merge var: " << var_name
<< " splited var: " << splited_var_name; << " split var: " << splited_var_name;
auto before_run_ids_merge_ = GetCurrentUS(); auto before_run_ids_merge_ = GetCurrentUS();
auto origin_var_name = DeltaVarToVar(var_name); auto origin_var_name = DeltaVarToVar(var_name);
auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name); auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name);
@ -567,9 +567,8 @@ void GeoSgdCommunicator::SendUpdateDenseVars(
// var_name: param.delta // var_name: param.delta
auto origin_var_name = DeltaVarToVar(var_name); auto origin_var_name = DeltaVarToVar(var_name);
auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name); auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name);
VLOG(4) << "Dense var: " << var_name VLOG(4) << "Dense var: " << var_name << " 's split var: " << splited_var_name
<< " 's splited var: " << splited_var_name << " split var index: " << splited_var_index;
<< " splited var index: " << splited_var_index;
auto before_run_send_dense = GetCurrentUS(); auto before_run_send_dense = GetCurrentUS();
auto cpu_ctx = paddle::platform::CPUDeviceContext(); auto cpu_ctx = paddle::platform::CPUDeviceContext();
@ -592,7 +591,7 @@ void GeoSgdCommunicator::SendUpdateDenseVars(
begin_loc = absolute_section_[origin_var_name][splited_var_index]; begin_loc = absolute_section_[origin_var_name][splited_var_index];
dimension = total_element / vars_first_dimension_[origin_var_name]; dimension = total_element / vars_first_dimension_[origin_var_name];
total_element = section * dimension; total_element = section * dimension;
VLOG(4) << "Dense splited var: " << splited_var_name VLOG(4) << "Dense split var: " << splited_var_name
<< " section: " << section << " dimension: " << dimension << " section: " << section << " dimension: " << dimension
<< " begin loc: " << begin_loc << " total_element " << " begin loc: " << begin_loc << " total_element "
<< total_element; << total_element;
@ -600,12 +599,12 @@ void GeoSgdCommunicator::SendUpdateDenseVars(
auto *var_x_data = var_x_tensor.mutable_data<float>(var_x_tensor.place()) + auto *var_x_data = var_x_tensor.mutable_data<float>(var_x_tensor.place()) +
begin_loc * dimension; begin_loc * dimension;
VLOG(4) << "Dense splited var: " << splited_var_name << " var_x_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_x_data[0] "
<< var_x_data[0] << " var_x_data[end] " << var_x_data[0] << " var_x_data[end] "
<< var_x_data[total_element - 1]; << var_x_data[total_element - 1];
auto *var_y_data = var_y_tensor.mutable_data<float>(var_y_tensor.place()) + auto *var_y_data = var_y_tensor.mutable_data<float>(var_y_tensor.place()) +
begin_loc * dimension; begin_loc * dimension;
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_data[0] "
<< var_y_data[0] << " var_y_data[end] " << var_y_data[0] << " var_y_data[end] "
<< var_y_data[total_element - 1]; << var_y_data[total_element - 1];
@ -616,14 +615,14 @@ void GeoSgdCommunicator::SendUpdateDenseVars(
var_z_tensor->mutable_data<float>(dims, cpu_ctx.GetPlace()); var_z_tensor->mutable_data<float>(dims, cpu_ctx.GetPlace());
auto *var_z_data = var_z_tensor->mutable_data<float>(cpu_ctx.GetPlace()); auto *var_z_data = var_z_tensor->mutable_data<float>(cpu_ctx.GetPlace());
VLOG(4) << "Dense splited var: " << splited_var_name << "var_z_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << "var_z_data[0] "
<< var_z_data[0] << " var_z_data[end] " << var_z_data[0] << " var_z_data[end] "
<< var_z_data[total_element - 1]; << var_z_data[total_element - 1];
// calc sub = var_training - var_old // calc sub = var_training - var_old
auto blas = math::GetBlas<paddle::platform::CPUDeviceContext, float>(cpu_ctx); auto blas = math::GetBlas<paddle::platform::CPUDeviceContext, float>(cpu_ctx);
blas.VSUB(total_element, var_x_data, var_y_data, var_z_data); blas.VSUB(total_element, var_x_data, var_y_data, var_z_data);
VLOG(4) << "Dense splited var: " << splited_var_name << " var_z_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_z_data[0] "
<< var_z_data[0] << " var_z_data[end] " << var_z_data[0] << " var_z_data[end] "
<< var_z_data[total_element - 1]; << var_z_data[total_element - 1];
@ -633,7 +632,7 @@ void GeoSgdCommunicator::SendUpdateDenseVars(
// calc var_old += var_delta // calc var_old += var_delta
blas.VADD(total_element, var_y_data, var_z_data, var_y_data); blas.VADD(total_element, var_y_data, var_z_data, var_y_data);
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_data[0] "
<< var_y_data[0] << " var_y_data[end] " << var_y_data[0] << " var_y_data[end] "
<< var_y_data[total_element - 1]; << var_y_data[total_element - 1];
@ -763,7 +762,7 @@ void GeoSgdCommunicator::RecvUpdateDenseVars(
section = dims[0]; section = dims[0];
begin_loc = absolute_section_[origin_var_name][splited_var_index]; begin_loc = absolute_section_[origin_var_name][splited_var_index];
dimension = total_element / section; dimension = total_element / section;
VLOG(4) << "Dense splited var: " << splited_var_name VLOG(4) << "Dense split var: " << splited_var_name
<< " section: " << section << " dimension: " << dimension << " section: " << section << " dimension: " << dimension
<< " begin loc: " << begin_loc << " total_element " << " begin loc: " << begin_loc << " total_element "
<< total_element; << total_element;
@ -771,18 +770,18 @@ void GeoSgdCommunicator::RecvUpdateDenseVars(
auto *var_x_data = var_x_tensor.mutable_data<float>(var_x_tensor.place()) + auto *var_x_data = var_x_tensor.mutable_data<float>(var_x_tensor.place()) +
begin_loc * dimension; begin_loc * dimension;
VLOG(4) << "Dense splited var: " << splited_var_name << " var_x_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_x_data[0] "
<< var_x_data[0] << " var_x_data[end] " << var_x_data[0] << " var_x_data[end] "
<< var_x_data[total_element - 1]; << var_x_data[total_element - 1];
auto *var_y_data = var_y_tensor.mutable_data<float>(var_y_tensor.place()) + auto *var_y_data = var_y_tensor.mutable_data<float>(var_y_tensor.place()) +
begin_loc * dimension; begin_loc * dimension;
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_data[0] "
<< var_y_data[0] << " var_y_data[end] " << var_y_data[0] << " var_y_data[end] "
<< var_y_data[total_element - 1]; << var_y_data[total_element - 1];
auto *var_z_data = var_z_tensor.mutable_data<float>(cpu_ctx.GetPlace()); auto *var_z_data = var_z_tensor.mutable_data<float>(cpu_ctx.GetPlace());
VLOG(4) << "Dense splited var: " << splited_var_name << " var_z_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_z_data[0] "
<< var_z_data[0] << " var_z_data[end] " << var_z_data[0] << " var_z_data[end] "
<< var_z_data[total_element - 1]; << var_z_data[total_element - 1];
@ -793,7 +792,7 @@ void GeoSgdCommunicator::RecvUpdateDenseVars(
auto *var_y_sub_data = auto *var_y_sub_data =
var_y_sub_tensor->mutable_data<float>(cpu_ctx.GetPlace()); var_y_sub_tensor->mutable_data<float>(cpu_ctx.GetPlace());
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_sub_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_sub_data[0] "
<< var_y_sub_data[0] << " var_y_sub_data[end] " << var_y_sub_data[0] << " var_y_sub_data[end] "
<< var_y_sub_data[total_element - 1]; << var_y_sub_data[total_element - 1];
@ -801,19 +800,19 @@ void GeoSgdCommunicator::RecvUpdateDenseVars(
// calc sub = pserver - old // calc sub = pserver - old
blas.VSUB(total_element, var_z_data, var_y_data, var_y_sub_data); blas.VSUB(total_element, var_z_data, var_y_data, var_y_sub_data);
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_sub_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_sub_data[0] "
<< var_y_sub_data[0] << " var_y_sub_data[end] " << var_y_sub_data[0] << " var_y_sub_data[end] "
<< var_y_sub_data[total_element - 1]; << var_y_sub_data[total_element - 1];
// calc train += sub // calc train += sub
blas.VADD(total_element, var_x_data, var_y_sub_data, var_x_data); blas.VADD(total_element, var_x_data, var_y_sub_data, var_x_data);
VLOG(4) << "Dense splited var: " << splited_var_name << " var_x_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_x_data[0] "
<< var_x_data[0] << " var_x_data[end] " << var_x_data[0] << " var_x_data[end] "
<< var_x_data[total_element - 1]; << var_x_data[total_element - 1];
// calc old = pserver // calc old = pserver
blas.VCOPY(total_element, var_z_data, var_y_data); blas.VCOPY(total_element, var_z_data, var_y_data);
VLOG(4) << "Dense splited var: " << splited_var_name << " var_y_data[0] " VLOG(4) << "Dense split var: " << splited_var_name << " var_y_data[0] "
<< var_y_data[0] << " var_y_data[end] " << var_y_data[0] << " var_y_data[end] "
<< var_y_data[total_element - 1]; << var_y_data[total_element - 1];
@ -824,7 +823,7 @@ void GeoSgdCommunicator::RecvUpdateDenseVars(
void GeoSgdCommunicator::RecvUpdateSparseVars( void GeoSgdCommunicator::RecvUpdateSparseVars(
const std::string &var_name, const std::string &splited_var_name) { const std::string &var_name, const std::string &splited_var_name) {
// step 1: recv splited var from pserver // step 1: recv split var from pserver
auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name); auto splited_var_index = GetSplitedVarIndex(var_name, splited_var_name);
auto origin_var_name = DeltaVarToVar(var_name); auto origin_var_name = DeltaVarToVar(var_name);
auto origin_splited_var_name = DeltaVarToVar(splited_var_name); auto origin_splited_var_name = DeltaVarToVar(splited_var_name);

@ -122,7 +122,7 @@ This operator can get variables from server side.
AddAttr<std::vector<std::string>>( AddAttr<std::vector<std::string>>(
"recv_varnames", "recv_varnames",
"(vector<string>) " "(vector<string>) "
"the splited parameter varnames to be recved from pserver") "the split parameter varnames to be recved from pserver")
.SetDefault(std::vector<std::string>{}); .SetDefault(std::vector<std::string>{});
AddAttr<int>("do_not_run", "if recv need to really run").SetDefault(0); AddAttr<int>("do_not_run", "if recv need to really run").SetDefault(0);
} }

@ -116,7 +116,7 @@ This operator will send variables to listen_and_serve op at the parameter server
AddAttr<std::vector<std::string>>( AddAttr<std::vector<std::string>>(
"send_varnames", "send_varnames",
"(vector<string>) " "(vector<string>) "
"the splited output varnames to send to pserver") "the split output varnames to send to pserver")
.SetDefault(std::vector<std::string>{}); .SetDefault(std::vector<std::string>{});
AddAttr<int>("num", AddAttr<int>("num",
"(int, default 0)" "(int, default 0)"

@ -28,7 +28,7 @@ namespace operators {
// x is Input, // x is Input,
// z is ResidualData, // z is ResidualData,
// bias is Bias // bias is Bias
// When `split_channels` is set, y will be splitted into multiple outputs, // When `split_channels` is set, y will be split into multiple outputs,
// each output has split_channels[i] number of channels. // each output has split_channels[i] number of channels.
class Conv2DFusionOpMaker : public Conv2DOpMaker { class Conv2DFusionOpMaker : public Conv2DOpMaker {
protected: protected:

@ -162,7 +162,7 @@ class HierarchicalSigmoidOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault({}); .SetDefault({});
AddAttr<std::vector<std::string>>( AddAttr<std::vector<std::string>>(
"table_names", "table_names",
"(string vector, the splited table names that will be fetched from " "(string vector, the split table names that will be fetched from "
"parameter server)" "parameter server)"
"in the order of input variables for mapping") "in the order of input variables for mapping")
.SetDefault({}); .SetDefault({});

@ -113,7 +113,7 @@ class LookupTableOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault({}); .SetDefault({});
AddAttr<std::vector<std::string>>( AddAttr<std::vector<std::string>>(
"table_names", "table_names",
"(string vector, the splited table names that will be fetched from " "(string vector, the split table names that will be fetched from "
"parameter server)" "parameter server)"
"in the order of input variables for mapping") "in the order of input variables for mapping")
.SetDefault({}); .SetDefault({});

@ -100,7 +100,7 @@ class LookupTableV2OpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault({}); .SetDefault({});
AddAttr<std::vector<std::string>>( AddAttr<std::vector<std::string>>(
"table_names", "table_names",
"(string vector, the splited table names that will be fetched from " "(string vector, the split table names that will be fetched from "
"parameter server)" "parameter server)"
"in the order of input variables for mapping") "in the order of input variables for mapping")
.SetDefault({}); .SetDefault({});

@ -777,11 +777,11 @@ void Blas<DeviceContext>::MatMul(const framework::Tensor &mat_a,
* When user calls this API, the multiplication of two big matrixes is split * When user calls this API, the multiplication of two big matrixes is split
* into multiplication of several (head_number_) small matrixes. e.g. if Mat A * into multiplication of several (head_number_) small matrixes. e.g. if Mat A
* is [3, 24] and Mat B is [24, 4], when multiple A and B with head_number as * is [3, 24] and Mat B is [24, 4], when multiple A and B with head_number as
* 4, Mat A will be splitted as 4 matrix of [3, 6] and Mat B will be * 4, Mat A will be split as 4 matrix of [3, 6] and Mat B will be
* (horizontally) splitted as 4 matrix of [6, 4]. The result of final matrix * (horizontally) split as 4 matrix of [6, 4]. The result of final matrix
* will be 4 matrix of [3, 4], i.e. [3, 16]. * will be 4 matrix of [3, 4], i.e. [3, 16].
* Another example is A is [3, 8], B is [2, 16], head_number is 4. In this * Another example is A is [3, 8], B is [2, 16], head_number is 4. In this
* case, A will be splitted as [3, 2], B will be (vertically) splitted as * case, A will be split as [3, 2], B will be (vertically) split as
* [2, 4]. The final result will be 4 matrix of 4 matrix of [3,4], i.e. [3, 16] * [2, 4]. The final result will be 4 matrix of 4 matrix of [3,4], i.e. [3, 16]
*/ */
template <typename DeviceContext> template <typename DeviceContext>

@ -106,7 +106,7 @@ class SimpleCode {
: c_(static_cast<size_t>(ids[code]) + num_classes) {} : c_(static_cast<size_t>(ids[code]) + num_classes) {}
/** /**
* Here the id of root should be 1 rather than 0, thus the encoding of class c * Here the id of root should be 1 rather than 0, thus the encoding of class c
* is `c + num_classes` and all siblings can get the same weight indice using * is `c + num_classes` and all siblings can get the same weight index using
* prefixes. * prefixes.
* Weight index is the prefixes of encoding, thus leave out the right most * Weight index is the prefixes of encoding, thus leave out the right most
* bit in calc_index. * bit in calc_index.
@ -133,7 +133,7 @@ class CustomCode {
} }
/** /**
* Here the id of root should be 1 rather than 0, thus the encoding of class c * Here the id of root should be 1 rather than 0, thus the encoding of class c
* is `c + num_classes` and all siblings can get the same weight indice using * is `c + num_classes` and all siblings can get the same weight index using
* prefixes. * prefixes.
* Weight index is the prefixes of encoding, thus leave out the right most * Weight index is the prefixes of encoding, thus leave out the right most
* bit in calc_index. * bit in calc_index.

@ -55,11 +55,12 @@ class FCPrimitiveFactory {
} // Otherwise, create a new one. } // Otherwise, create a new one.
auto in_col_dims = ctx.Attr<int>("in_num_col_dims"); auto in_col_dims = ctx.Attr<int>("in_num_col_dims");
PADDLE_ENFORCE_LE(in_col_dims, 2, PADDLE_ENFORCE_LE(
platform::errors::Unimplemented( in_col_dims, 2,
"DNNL FC doesn't support in_num_col_dims paramter to " platform::errors::Unimplemented(
"be higher than " "DNNL FC doesn't support in_num_col_dims parameter to "
"2.")); "be higher than "
"2."));
if (in_col_dims == 2) { if (in_col_dims == 2) {
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
input->dims().size(), 3, input->dims().size(), 3,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save