Control Global Compilation Behavior
mlx_compile_control.Rd- mlx_disable_compile()prevents all compilation globally. Compiled functions will execute without optimization.
- mlx_enable_compile()enables compilation (overrides the- MLX_DISABLE_COMPILEenvironment variable).
Details
These functions control whether MLX compilation is enabled globally.
These are useful for debugging (to check if compilation is causing issues) or benchmarking (to measure compilation overhead vs speedup).
You can also disable compilation by setting the MLX_DISABLE_COMPILE
environment variable before loading the package.