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
2 changes: 1 addition & 1 deletion cmake/generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ function(cc_test_old TARGET_NAME)
cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
cc_test_build(${TARGET_NAME} SRCS ${cc_test_SRCS} DEPS ${cc_test_DEPS})
# we donot test hcom op, because it need complex configuration
# we do not test hcom op, because it need complex configuration
# with more than one machine
cc_test_run(${TARGET_NAME} COMMAND ${TARGET_NAME} ARGS ${cc_test_ARGS})
elseif(WITH_TESTING AND NOT TEST ${TARGET_NAME})
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/inference/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# In Windows, c_api test link must link both 2 shared to avoid symbols redefinition,
# in Linux, c_api test cant do like this or graph_to_program register more than once.
# in Linux, c_api test can't do like this or graph_to_program register more than once.
# Both Windows and Linux can only use paddle_inference_c, but this will increase size
# of build folder by 30G.
set(inference_api_tester_deps paddle_inference_api analysis_config)
Expand Down
4 changes: 2 additions & 2 deletions test/cpp/inference/api/tester_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void SetFakeImageInput(std::vector<std::vector<PaddleTensor>> *inputs,
std::string model_filename = "model",
std::string params_filename = "params",
const std::vector<std::string> *feed_names = nullptr,
const int continuous_inuput_index = 0) {
const int continuous_input_index = 0) {
// Set fake_image_data
PADDLE_ENFORCE_EQ(FLAGS_test_all_data,
0,
Expand Down Expand Up @@ -442,7 +442,7 @@ void SetFakeImageInput(std::vector<std::vector<PaddleTensor>> *inputs,
// fill input data, for profile easily, do not use random data here.
for (size_t j = 0; j < len; ++j) {
*(input_data + j) =
static_cast<float>((j + continuous_inuput_index) % len) / len;
static_cast<float>((j + continuous_input_index) % len) / len;
}
}
(*inputs).emplace_back(input_slots);
Expand Down
4 changes: 2 additions & 2 deletions test/cpp/inference/infer_ut/test_ernie_xnli_int8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ std::shared_ptr<Predictor> InitPredictor() {
// only kHalf supported
config.EnableTensorRtEngine(
1 << 30, 1, 5, Config::Precision::kInt8, false, false);
// erinie varlen must be used with dynamic shape
// ernie varlen must be used with dynamic shape
config.SetTRTDynamicShapeInfo(
min_input_shape, max_input_shape, opt_input_shape);
// erinie varlen must be used with oss
// ernie varlen must be used with oss
config.EnableVarseqlen();
paddle_infer::experimental::InternalUtils::SetTransformerPosid(&config,
input_name2);
Expand Down
4 changes: 2 additions & 2 deletions test/cpp/inference/infer_ut/test_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void SingleThreadPrediction(paddle_infer::Predictor *predictor,

void CompareRecord(std::map<std::string, Record> *truth_output_data,
std::map<std::string, Record> *infer_output_data,
float epislon = 1e-5) {
float epsilon = 1e-5) {
for (const auto &[key, value] : *infer_output_data) {
auto truth_record = (*truth_output_data)[key];
VLOG(1) << "output name: " << key;
Expand All @@ -159,7 +159,7 @@ void CompareRecord(std::map<std::string, Record> *truth_output_data,
VLOG(1) << "compare: " << value.data.data()[i] << ",\t"
<< truth_record.data.data()[i];
ASSERT_LT(fabs(value.data.data()[i] - truth_record.data.data()[i]),
epislon);
epsilon);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/deprecated/legacy_test/test_lbfgs_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def func(position):
# minimum = (a, a^2)
x, y = position[0], position[1]
c = (a - x) ** 2 + b * (y - x**2) ** 2
# the return cant be np array[1], or in jacobin will cause flat error
# the return can't be np array[1], or in jacobin will cause flat error
return c[0]

x0 = np.random.random(size=[2]).astype('float32')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
np.random.randn(4, 3, 2), # x
np.random.randint(-3, 3, size=(16,)), # index
1, # axis
np.random.randint(0, 3, size=(4, 16, 2)), # valie
np.random.randint(0, 3, size=(4, 16, 2)), # value
np.random.rand(4, 3, 2), # cotangent
np.float32, # dtype
),
Expand Down
Loading