Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions npbench/infrastructure/dace_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ def cp_copy_func(arr):
return cp_copy_func
return super().copy_func()

def copy_back_func(self) -> Callable:
""" Returns the copy-method that should be used
for copying the benchmark outputs back to the host. """
if self.fname == "dace_gpu":
import cupy

def cp_copy_back_func(arr):
return cupy.asnumpy(arr)

return cp_copy_back_func
return super().copy_back_func()

def implementations(self, bench: Benchmark) -> Sequence[Tuple[Callable, str]]:
""" Returns the framework's implementations for a particular benchmark.
:param bench: A benchmark.
Expand Down