voiage.backends.performance_profiler.JaxPerformanceProfiler
Profile and optimize JAX computations.
Methods
Section titled “Methods”profile_function
Section titled “profile_function”profile_function([positional or keyword] self: None = None, [positional or keyword] func: Callable[..., object] = None) -> Callable[..., object]Profile function execution time.
Parameters:
selffuncCallable[..., object]
Returns: Callable[..., object]
compare_implementations
Section titled “compare_implementations”compare_implementations([positional or keyword] self: None = None, [positional or keyword] numpy_func: Callable[..., object] = None, [positional or keyword] jax_func: Callable[..., object] = None, [positional or keyword] test_data: tuple[object, ...] = None, [positional or keyword] n_runs: int = 10) -> dict[str, list[float]]Compare NumPy vs JAX implementations.
Parameters:
selfnumpy_funcCallable[..., object]jax_funcCallable[..., object]test_datatuple[object, ...]n_runsint(default:10)
Returns: dict[str, list[float]]
memory_usage_analysis
Section titled “memory_usage_analysis”memory_usage_analysis([positional or keyword] self: None = None, [positional or keyword] func: Callable[..., object] = None, [variadic positional] args: object = (), [variadic keyword] kwargs: object = {}) -> dict[str, object]Analyze memory usage of a function.
Parameters:
selffuncCallable[..., object]argsobject(default:())kwargsobject(default:{})
Returns: dict[str, object]
get_performance_report
Section titled “get_performance_report”get_performance_report([positional or keyword] self: None = None) -> dict[str, dict[str, object]]Generate performance report.
Parameters:
self
Returns: dict[str, dict[str, object]]