Before Hebel can be used, it must be initialized using the function hebel.init().
- hebel.init(device_id=None, random_seed=None)¶
This function creates a CUDA context, CUBLAS context and initializes and seeds the pseudo-random number generator.
- device_id : integer, optional
- The ID of the GPU device to use. If this is omitted, PyCUDA’s default context is used, which by default uses the fastest available device on the system. Alternatively, you can put the device id in the environment variable CUDA_DEVICE or into the file .cuda-device in the user’s home directory.
- random_seed : integer, optional
- The seed to use for the pseudo-random number generator. If this is omitted, the seed is taken from the environment variable RANDOM_SEED and if that is not defined, a random integer is used as a seed.