Environment Settings

Environment Settings#

set

Set the default computation environment.

set_environment

Set the default computation environment.

set_float

Set global default float type.

get_float

Get the default float data type.

set_int

Set global default integer type.

get_int

Get the default int data type.

set_bool

Set global default boolean type.

get_bool

Get the default boolean data type.

set_complex

Set global default complex type.

get_complex

Get the default complex data type.

set_dt

Set the default numerical integrator precision.

get_dt

Get the numerical integrator precision.

set_mode

Set the default computing mode.

get_mode

Get the default computing mode.

enable_x64

disable_x64

set_platform

Changes platform to CPU, GPU, or TPU.

get_platform

Get the computing platform.

set_host_device_count

By default, XLA considers all CPU cores as one device.

clear_buffer_memory

Clear all on-device buffers.

enable_gpu_memory_preallocation

Disable pre-allocating the GPU memory.

disable_gpu_memory_preallocation

Disable pre-allocating the GPU memory.

ditype

Default int type.

dftype

Default float type.

environment

Context-manager that sets a computing environment for brain dynamics computation.

batching_environment

Environment with the batching mode.

training_environment

Environment with the training mode.