Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU only unit test fails on some operators. #7546

Closed
typhoonzero opened this issue Jan 16, 2018 · 3 comments
Closed

CPU only unit test fails on some operators. #7546

typhoonzero opened this issue Jan 16, 2018 · 3 comments
Assignees

Comments

@typhoonzero
Copy link
Contributor

Binaries were built by cmake -DWITH_COVERAGE=ON -DWITH_GPU=OFF -DWITH_MKL=OFF ..

failed tests:

The following tests FAILED:
	147 - test_conv2d_op (Failed)
	148 - test_conv2d_transpose_op (Failed)
	149 - test_conv3d_op (Failed)
	150 - test_conv3d_transpose_op (Failed)
	219 - test_norm_op (OTHER_FAULT)
	227 - test_pool2d_op (Failed)
	228 - test_pool3d_op (Failed)
	233 - test_print_op (Failed)
	286 - test_label_semantic_roles (Failed)

some error logs:

ERROR: test_check_output (__main__.TestCUDNNCase6)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_pool3d_op.py", line 99, in test_check_output
    self.check_output_with_place(place, atol=1e-5)
  File "/Users/baidu/go/src/github.com/PaddlePaddle/Paddle/python/paddle/v2/fluid/tests/op_test.py", line 276, in check_output_with_place
    feed_map = self.feed_var(inputs, place)
  File "/Users/baidu/go/src/github.com/PaddlePaddle/Paddle/python/paddle/v2/fluid/tests/op_test.py", line 245, in feed_var
    tensor.set(self.inputs[var_name], place)
TypeError: set(): incompatible function arguments. The following argument types are supported:
    1. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[float32], arg1: paddle::platform::CPUPlace) -> None
    2. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[int32], arg1: paddle::platform::CPUPlace) -> None
    3. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[float64], arg1: paddle::platform::CPUPlace) -> None
    4. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[int64], arg1: paddle::platform::CPUPlace) -> None
    5. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[bool], arg1: paddle::platform::CPUPlace) -> None
...
ERROR: test_backward (__main__.TestPrintOpGPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_print_op.py", line 63, in setUp
    self.x_tensor.set(tensor_np, self.place)
TypeError: set(): incompatible function arguments. The following argument types are supported:
    1. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[float32], arg1: paddle::platform::CPUPlace) -> None
    2. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[int32], arg1: paddle::platform::CPUPlace) -> None
    3. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[float64], arg1: paddle::platform::CPUPlace) -> None
    4. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[int64], arg1: paddle::platform::CPUPlace) -> None
    5. (self: paddle.v2.fluid.core.Tensor, arg0: numpy.ndarray[bool], arg1: paddle::platform::CPUPlace) -> None

Invoked with: <paddle.v2.fluid.core.LoDTensor object at 0x11fc257e0>, array([[  9.42935944e-01,   9.69691992e-01,   1.25991538e-01],
       [  3.44808817e-01,   4.29206935e-04,   3.35851520e-01]], dtype=float32), <paddle.v2.fluid.core.CUDAPlace object at 0x11fc259c0>
@typhoonzero
Copy link
Contributor Author

The current CI only build with WITH_GPU=OFF but did not run the tests.

@chengduoZH
Copy link
Contributor

class TestCUDNN(TestConv2dOp):
def init_op_type(self):
self.use_cudnn = True
self.op_type = "conv2d"

TestCUDNN should check whether compiling with gpu, core.is_compile_gpu().

@chengduoZH
Copy link
Contributor

chengduoZH commented Jan 16, 2018

Maybe this PR will solve part of those problems.
Please feel free to review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants