Skip to content

Commit 6de08b5

Browse files
committed
set default timeout to avoiding blocking CI
test=develop
1 parent c26f2b2 commit 6de08b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmake/generic.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ function(cc_test TARGET_NAME)
311311
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
312312
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
313313
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
314+
# No unit test should exceed 10 minutes.
315+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
314316
endif()
315317
endfunction(cc_test)
316318

@@ -629,6 +631,8 @@ function(py_test TARGET_NAME)
629631
PYTHONPATH=${PADDLE_BINARY_DIR}/python ${py_test_ENVS}
630632
${PYTHON_EXECUTABLE} -u ${py_test_SRCS} ${py_test_ARGS}
631633
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
634+
# No unit test should exceed 10 minutes.
635+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
632636
endif()
633637
endfunction()
634638

paddle/fluid/framework/op_desc.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ class CompileTimeInferShapeContext : public InferShapeContext {
8181
"The %s[%d] is @EMPTY@", out, j);
8282
auto *in_var = block_.FindVarRecursive(Inputs(in)[i]);
8383
auto *out_var = block_.FindVarRecursive(Outputs(out)[j]);
84-
if (in_var->GetType() != proto::VarType::LOD_TENSOR) {
85-
VLOG(3) << "input " << in << " is not LodTensor";
86-
return;
87-
}
8884
PADDLE_ENFORCE_EQ(in_var->GetType(), proto::VarType::LOD_TENSOR,
8985
"The %d-th output of Output(%s) must be LoDTensor.", j,
9086
out);

0 commit comments

Comments
 (0)