Skip to content

Instantly share code, notes, and snippets.

@skrah
skrah / gpubench.py
Last active August 21, 2018 15:27
XND GPU benchmark
import sys
sys.path.append('../xnd-gpu')
from xnd_gpu import xnd_gpu
import gpu_func
from xnd import xnd
from gumath import functions as fn
import gumath as gm
import numpy as np
@skrah
skrah / bench.py
Created August 21, 2018 11:27
Benchmark for threaded XND vs. NumPy
import sys, time
import gumath as gm
import gumath.functions as fn
from xnd import xnd
import numpy as np
import gc
#
# The array sizes are for >=16GB of memory. Your system might freeze if