class_docstr: Test class for `Perplexity` metric.
docstr: Test dtype support of the metric on GPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","GPU","."]
code: def test_perplexity_dtypes_gpu(
      self, preds, target, ignore_index, dtype
  ):
      """Test dtype support of the metric on GPU."""
      self.run_precision_test_gpu(
          preds,
          target,
          Perplexity,
          perplexity,
          metric_args={"ignore_index": ignore_index},
          dtype=dtype,
      )
  
file_path: torchmetrics/tests/unittests/text/test_perplexity.py
imports: from functools import partial
  import pytest
  import torch
  from torch.nn import functional
  from torchmetrics.functional.text.perplexity import perplexity
  from torchmetrics.text.perplexity import Perplexity
  from unittests.helpers.testers import MetricTester
  from unittests.text.inputs import MASK_INDEX, _logits_inputs_fp32, _logits_inputs_fp32_with_mask, _logits_inputs_fp64, _logits_inputs_fp64_with_mask
label_desc: Use image node_id 5 for calling the TestPerplexity obj's underlying member method code with example usage: obj.test_perplexity_dtypes_gpu(preds, target, ignore_index, dtype) without return types