Config
- class Config
Configurations.
Warning
The simulation platform must be configured immediately after importing
simphony
, without performing any other operations beforehand:import simphony simphony.Config.set_platform('gpu')
The default simulation platform is the CPU.
Note
To enable automatic differentiation mode, use:
simphony.Config.set_autodiff_mode(True)
By default, it is disabled.
Hint
'retina'
as matplotlib format is recommended:simphony.Config.set_matplotlib_format('retina')
Methods
Returns whether automatic differentiation mode is enabled.
Get the current platform of
jax
.set_autodiff_mode
(enable)Enable or disable automatic differentiation mode.
set_gpu
(gpu_id)Set the visible GPU device by setting the CUDA_VISIBLE_DEVICES environment variable.
set_matplotlib_format
(matplotlib_format)Set the format of
matplotlib
.set_platform
(platform)Set the simulation platform of
jax
to'cpu'
or'gpu'
.