Skip to content

Commit 71db3d7

Browse files
committed
black-scholes: copy result arrays to host before verification
1 parent d33deea commit 71db3d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/black_scholes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def eval():
246246
info(f"Median rate: {perf_rate:.5f} Mopts/s")
247247

248248
# verify
249-
call, put = args[-2], args[-1]
249+
call = args[-2].to_device()
250+
put = args[-1].to_device()
250251
expected_call = 16.976097804669887
251252
expected_put = 0.34645174725098116
252253
call_value = float(call[0])

0 commit comments

Comments
 (0)