curand.py 272 Bytes
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
10
11
12
# nvprof --print-gpu-trace python examples/stream/curand.py
import cupy

rand = cupy.random.RandomState()

stream = cupy.cuda.stream.Stream()
with stream:
    y = rand.lognormal(size=(1, 3))

stream = cupy.cuda.stream.Stream()
stream.use()
y = rand.lognormal(size=(1, 3))