cupy.testing.for_dtypes#

cupy.testing.for_dtypes(dtypes, name='dtype')[源代码][源代码]#

用于参数化dtype测试的装饰器。

参数:
  • dtypes (list of dtypes) – 要测试的数据类型。

  • name (str) – 传递指定数据类型的参数名称。

这个装饰器向测试夹具添加一个由 name 指定的关键字参数。然后,它通过将 dtypes 的每个元素传递给命名参数来并行运行夹具。