Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to measure your dataflow using cupy & numpy

139 views

Published on

How to measure your dataflow using cupy & numpy

2018/04/18
SAKURA Internet, Inc.
Research Center
SR / Naoto MATSUMOTO

Published in: Technology
  • Be the first to comment

How to measure your dataflow using cupy & numpy

  1. 1. How to measure your dataflow using cupy & numpy 2018/04/18 SAKURA Internet, Inc. Research Center SR / Naoto MATSUMOTO (C) Copyright 1996-2018 SAKURA Internet Inc
  2. 2. How to measure your dataflow using cupy & numpy 2 R = randint(0,100,600000000) R = randint(0,100,600000000) a = cp.array(R, dtype=np.uint8) 2.27 sec a = np.array(R, dtype=np.uint8) 0.46 sec cp.sort(a) np.sort(a) numpy cupy SOURCE: SAKURA Internet Research Center. (04/2018) Project Sprig. import time import cupy as cp import numpy as np from numpy.random import * start = time.time() R = randint(0,100,600000000) end = time.time() print ( end - start ) start = time.time() a = np.array(R, dtype=np.uint8) end = time.time() print ( end - start ) start = time.time() np.sort(a) end = time.time() print ( end - start ) import time import cupy as cp import numpy as np from numpy.random import * start = time.time() R = randint(0,100,600000000) end = time.time() print ( end - start ) start = time.time() a = cp.array(R, dtype=cp.uint8) end = time.time() print ( end - start ) start = time.time() cp.sort(a) end = time.time() print ( end - start ) 5.36 sec 15.1sec 5.36 sec 0.54 sec

×