msdnet.gpuoperations module¶
Module implementing network operations on GPU using Numba.
-
msdnet.gpuoperations.
get1dgridsize
(sz, tpb=1024)[source]¶ Return CUDA grid size for 1d arrays.
- Parameters
sz – input array size
tpb – (optional) threads per block
-
msdnet.gpuoperations.
get2dgridsize
(sz, tpb=(8, 8))[source]¶ Return CUDA grid size for 2d arrays.
- Parameters
sz – input array size
tpb – (optional) threads per block
-
class
msdnet.gpuoperations.
GPUImageData
(shape, dl, nin)[source]¶ Bases:
object
Object that represents a set of 2D images on GPU.
- Parameters
shape – total shape of all images
dl – list of dilations in the network
nin – number of input images of network
-
fill
(val, start=None, end=None)[source]¶ Set image data to single scalar value.
- Parameters
val – scalar value
-
add
(val, i)[source]¶ Add scalar to single image.
- Parameters
val – scalar to add
i – index of image to add value to
-
mult
(val, i)[source]¶ Multiply single image with value.
- Parameters
val – value
i – index of image to multiply
-
forw_conv
(i, outidx, dl)[source]¶ Perform forward convolutions
- Parameters
i – image index to compute
outidx – image index to write output to
dl – dilation list