Skip to content

Commit

Permalink
Revert "[docs] [testing] gpu decorators table (huggingface#8422)"
Browse files Browse the repository at this point in the history
This reverts commit dea91cc.
  • Loading branch information
fabiocapsouza committed Nov 15, 2020
1 parent 976e85b commit 387221d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions docs/source/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,22 +409,6 @@ decorators are used to set the requirements of tests CPU/GPU/TPU-wise:
* ``require_torch_non_multigpu`` - as ``require_torch`` plus requires 0 or 1 GPUs
* ``require_torch_tpu`` - as ``require_torch`` plus requires at least 1 TPU

Let's depict the GPU requirements in the following table:


+----------+---------------------------------+
| n gpus | decorator |
+==========+=================================+
| ``>= 0`` | ``@require_torch`` |
+----------+---------------------------------+
| ``>= 1`` | ``@require_torch_gpu`` |
+----------+---------------------------------+
| ``>= 2`` | ``@require_torch_multigpu`` |
+----------+---------------------------------+
| ``< 2`` | ``@require_torch_non_multigpu`` |
+----------+---------------------------------+


For example, here is a test that must be run only when there are 2 or more GPUs available and pytorch is installed:

.. code-block:: python
Expand Down

0 comments on commit 387221d

Please sign in to comment.