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

Shall we need to run the unit tests with CPU mode on CI #8929

Closed
Yancey1989 opened this issue Mar 9, 2018 · 4 comments
Closed

Shall we need to run the unit tests with CPU mode on CI #8929

Yancey1989 opened this issue Mar 9, 2018 · 4 comments
Assignees

Comments

@Yancey1989
Copy link
Contributor

Yancey1989 commented Mar 9, 2018

I found the unit test related selected_rows run failed with cmake flag is WITH_GPU=OFF, and @luotao1 also reproduce this situation on her host:

200: Test command: /usr/bin/env "PYTHONPATH=/paddle/build/python/build/lib-python" "/usr/bin/python2.7" "-u" "-m" "unittest" "--verbose" "test_selected_rows"
200: Test timeout computed to be: 9.99988e+06
200: test_selected_rows (test_selected_rows.TestSelectedRows) ... ERROR
200:
200: ======================================================================
200: ERROR: test_selected_rows (test_selected_rows.TestSelectedRows)
200: ----------------------------------------------------------------------
200: Traceback (most recent call last):
200:   File "test_selected_rows.py", line 34, in test_selected_rows
200:     self.assertEqual(0, selected_rows.rows()[0])
200: TypeError: Unable to convert function return value to a Python type! The signature was
200: 	(self: paddle.fluid.core.SelectedRows) -> paddle::framework::Vector<long>
200:
200: ----------------------------------------------------------------------
200: Ran 1 test in 0.000s

It may be a bug in only CPU, and our CI system doesn't run unit tests with WITH_GPU=OFF, so how about turn on the unit tests on CPU? It would increase few minutes (GPU unit tests run 6m), but it may be worth.

@Yancey1989 Yancey1989 changed the title Shall we need to run the unit tests with CPU mode? Shall we need to run the unit tests with CPU mode on CI Mar 9, 2018
@helinwang
Copy link
Contributor

Maybe we should run CPU test as well, when WITH_GPU=ON? I think by definition test means "run all available tests", and the available tests when WITH_GPU=ON includes the CPU tests.

@typhoonzero
Copy link
Contributor

If build with GPU, CPU tests also runs.
I'm wondering why CPU only test can differ from run both CPU and GPU tests?

@luotao1
Copy link
Contributor

luotao1 commented Mar 12, 2018

I'm wondering why CPU only test can differ from run both CPU and GPU tests?

Yes, I'm wondering as well.

@luotao1
Copy link
Contributor

luotao1 commented Mar 30, 2018

Discussed with @wangkuiyi, and he supports to turn on the unit tests on ONLY_CPU mode after fixing related fails.

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

6 participants