def cpu_or_gpu(test_method):
    """
    Decorator to indicate that a test should run on both CPU and GPU
    """
    return pytest.mark.gpu(test_method)
Decorator to indicate that a test should run on both CPU and GPU
allennlp/common/testing/__init__.py