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

Consistent test_gpu flag #1132

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Consistent test_gpu flag #1132

merged 1 commit into from
Oct 11, 2022

Conversation

ianthomas23
Copy link
Member

Fixes #1130.

This simplifies the test_gpu flag so that it is boolean. Previously it could be True, False or None (meaning unspecified) and the None option was supposed to behave the same as False but with different test skipped messages. But it wasn't handled consistently, now it is. It still defaults to not running GPU tests. I am not sure this is the best default, but it can be dealt with in a later PR.

On a system with a GPU and with cupy and cudf installed, running the tests in either of these ways runs exactly the same tests (i.e. ignores the all GPU tests):

pytest datashader/tests
DATASHADER_TEST_GPU=0 pytest datashader/tests

and to run all tests including GPU ones use

DATASHADER_TEST_GPU=1 pytest datashader/tests

Also tested all 3 options in an environment without cupy and cudf installed, and if you set DATASHADER_TEST_GPU=1 then the test_gpu_dependencies test fails as expected.

After this PR, all tests run on CPU and GPU on my dev machine (Ubuntu 22.04 x86_64, Nvidia Quadro T1000) with the exception of that identified in issue #1131, which can be manually disabled using the -k "not log_axis_line" command-line argument.

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@ianthomas23 ianthomas23 merged commit 7b8aad8 into holoviz:master Oct 11, 2022
@ianthomas23 ianthomas23 deleted the test_gpu_flag branch October 11, 2022 15:35
@ianthomas23 ianthomas23 added this to the v0.14.3 milestone Nov 3, 2022
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

Successfully merging this pull request may close these issues.

GPU test problems if run without DATASHADER_TEST_GPU being set
2 participants