We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6e91a commit 4535367Copy full SHA for 4535367
dpnp/tests/helper.py
@@ -540,3 +540,14 @@ def requires_intel_mkl_version(version): # pragma: no cover
540
541
build_deps = numpy.show_config(mode="dicts")["Build Dependencies"]
542
return build_deps["blas"]["version"] >= version
543
+
544
545
+def requires_memory(no_of_gbs, device=None):
546
+ """
547
+ Check if the required number of GBs in memory of a device (the default one
548
+ if not provided) is available.
549
550
551
552
+ free_mem = get_dev_info(device).get("free_memory", 0)
553
+ return free_mem > no_of_gbs * (1024**3)
0 commit comments