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

test_mxnet_wrapper: Feature-gate GPU test #717

Merged
merged 1 commit into from
Jul 6, 2022
Merged
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
5 changes: 3 additions & 2 deletions thinc/tests/layers/test_mxnet_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from thinc.api import Adam, ArgsKwargs, Model, Ops, MXNetWrapper
from thinc.api import get_current_ops, mxnet2xp, xp2mxnet
from thinc.types import Array2d, Array1d, IntsXd
from thinc.compat import has_cupy, has_mxnet
from thinc.compat import has_cupy_gpu, has_mxnet
from thinc.util import to_categorical

from ..util import check_input_converters, make_tempdir
Expand Down Expand Up @@ -158,7 +158,8 @@ def test_mxnet_wrapper_to_cpu(mx_model, X: Array2d):
model.to_cpu()


@pytest.mark.skipif(not has_mxnet or not has_cupy, reason="needs MXNet")
@pytest.mark.skipif(not has_mxnet, reason="needs MXNet")
@pytest.mark.skipif(not has_cupy_gpu, reason="needs GPU/cupy")
def test_mxnet_wrapper_to_gpu(model: Model[Array2d, Array2d], X: Array2d):
model.predict(X)
model.to_gpu(0)
Expand Down