jax API reference
400 public APIs from jax (jax-ml/jax) — 60 classes, 303 functions, 37 methods. Signatures extracted by static analysis of the actual source.
Repository: jax-ml/jax
| Kind | Count |
|---|---|
| Classes | 60 |
| Functions | 303 |
| Methods | 37 |
API list
func
build_wheel.copy_file(src_file:str, dst_dir:str) -> NoneCopy a file to the destination directory.
func
build_wheel.prepare_srcs(deps:list[str], srcs_dir:str) -> NoneFilter the sources and copy them to the destination directory.
func
jax._src.ad_checkpoint.remat(fun:Callable, *prevent_cse:bool=True, *policy:Callable[..., bool] | None=None, *static_argnums:int | tuple[int, ...]=()) -> CallableAlias of :func:`jax.checkpoint`.
func
jax._src.ad_checkpoint.save_any_names_but_these(*names_not_to_save)Save only named values, i.e.
func
jax._src.ad_checkpoint.save_from_both_policies(policy_1, policy_2)Logical OR of the given policies.
class
jax._src.api.NotSpecifiedSentinel for use in jax.jit
func
jax._src.api.clear_caches()Clear all compilation and staging caches.
func
jax._src.api.device_get(x:Any)Transfer ``x`` to host.
func
jax._src.api.device_put(x, device:None | xc.Device | Sharding | P | Format | Any=None, *src:None | xc.Device | Sharding | P | Format | Any=None, *donate:bool | Any=False, *may_alias:bool | None | Any=None)Transfers ``x`` to ``device``.
func
jax._src.api.eval_shape(fun:Callable, *args, **kwargs)Compute the shape/dtype of ``fun`` without any FLOPs.
func
jax._src.api.hessian(fun:Callable, argnums:int | Sequence[int]=0, has_aux:bool=False, holomorphic:bool=False) -> CallableHessian of ``fun`` as a dense array.
func
jax._src.api.jacobian(fun:Callable, argnums:int | Sequence[int]=0, has_aux:bool=False, holomorphic:bool=False, allow_int:bool=False) -> CallableAlias of :func:`jax.jacrev`.
func
jax._src.api.jvp(fun:Callable, primals, tangents, has_aux:bool=False) -> tuple[Any, ...]Computes a (forward-mode) Jacobian-vector product of ``fun``.
func
jax._src.api.linear_transpose(fun:Callable, *reduce_axes=(), *primals) -> CallableTranspose a function that is promised to be linear.
func
jax._src.api.tuptree_flags(prefix, treedef, name:str, full_name:str) -> list[bool]Expand a flags prefix into per-leaf flags for `treedef`.
func
jax._src.api.vmap(fun:F, in_axes:int | None | Sequence[Any]=0, out_axes:Any=0, axis_name:AxisName | None=None, axis_size:int | None=None, spmd_axis_name:AxisName | tuple[AxisName, ...] | None=None, sum_match:bool=False) -> FVectorizing map.
func
jax._src.api_util.rebase_donate_argnums(donate_argnums, static_argnums) -> tuple[int, ...]Shifts donate to account for static.
class
jax._src.array.ShardA single data shard of an Array.
func
jax._src.array.as_slice_indices(arr:Any, idx:Index) -> tuple[tuple[int, ...], tuple[int, ...], tuple[int, ...]]Returns start_indices, limit_indices, removed_dims
method
jax._src.basearray.Array.addressable_data(index:int) -> ArrayReturn an array of the addressable data at a particular index.
method
jax._src.basearray.Array.addressable_shards() -> Sequence[Shard]List of addressable shards.
method
jax._src.basearray.Array.committed() -> boolWhether the array is committed or not.
method
jax._src.basearray.Array.device() -> Device | ShardingArray API-compatible device attribute.
method
jax._src.basearray.Array.dtype() -> np.dtypeThe data type (:class:`numpy.dtype`) of the array.
method
jax._src.basearray.Array.global_shards() -> Sequence[Shard]List of global shards.
method
jax._src.basearray.Array.is_fully_addressable() -> boolIs this Array fully addressable?
method
jax._src.basearray.Array.is_fully_replicated() -> boolIs this Array fully replicated?
method
jax._src.basearray.Array.ndim() -> intThe number of dimensions in the array.
method
jax._src.basearray.Array.shape() -> tuple[int, ...]The shape of the array.
method
jax._src.basearray.Array.sharding() -> ShardingThe sharding for the array.
method
jax._src.basearray.Array.size() -> intThe total number of elements in the array.
func
jax._src.blocked_sampler.sample_block(sampler_fn:SampleFn, keys:NdKeyList, block_size:Shape, tile_size:Shape, *args, **kwargs) -> ArrayDraws random samples for a single block.
func
jax._src.cache_key.add_flag_prefixes(flag_prefixes:list[str]) -> NoneAdd flag prefixes to include in the cache key.
func
jax._src.cache_key.clear_flag_prefixes() -> NoneClear flag prefixes added by add_flag_prefixes().
func
jax._src.cache_key.custom_hook() -> strCustom hook for any addition to the cache key.
func
jax._src.cache_key.get(module:ir.Module, devices:np.ndarray, compile_options:xla_client.CompileOptions, backend:xla_client.Client, compression_algorithm:str='zstandard', ignore_custom_partitioning:bool=False) -> strCreates a hashed string to use as a key to the compilation cache.
func
jax._src.cache_key.get_flag_prefixes() -> list[str]Return flag prefixes added by add_flag_prefixes().
func
jax._src.checkify.check(pred:Bool, msg:str, *debug:bool=False, *fmt_args, **fmt_kwargs) -> NoneCheck a predicate, add an error with msg if predicate is False.
func
jax._src.checkify.check_error(error:Error) -> NoneRaise an Exception if ``error`` represents a failure.
func
jax._src.checkify.debug_check(pred:Bool, msg:str, *fmt_args, **fmt_kwargs) -> NoneCheck a predicate when running under checkify, otherwise is a no-op.
func
jax._src.checkify.div_error_check(error, enabled_errors, x, y)Checks for division by zero and NaN.
func
jax._src.cloud_tpu_init.cloud_tpu_init() -> NoneAutomatically sets Cloud TPU topology and other env vars.
func
jax._src.cloud_tpu_init.is_libtpu_at_least(version_str:str) -> boolReturns True if not running on Cloud TPU.
class
jax._src.clusters.cluster.ClusterEnvInterface for defining a cluster environment.
method
jax._src.clusters.cluster.ClusterEnv.get_coordinator_address(timeout_secs:int | None, override_coordinator_port:str | None) -> strReturns address and port used by JAX to bootstrap.
method
jax._src.clusters.cluster.ClusterEnv.get_local_process_id() -> int | NoneGet index of current process inside a host.
class
jax._src.compilation_cache.VerificationCacheA cache that wraps another cache and verifies its contents.
func
jax._src.compilation_cache.get_file_cache(path:str) -> tuple[CacheInterface, str] | NoneReturns the file cache and the path to the cache.
func
jax._src.compilation_cache.initialize_cache(path) -> NoneThis API is deprecated; use set_cache_dir instead.
func
jax._src.compilation_cache.is_executable_in_cache(backend, cache_key:str) -> boolChecks if the executable is in the cache.
func
jax._src.compilation_cache.is_initialized() -> boolDeprecated.
func
jax._src.compilation_cache.reset_cache() -> NoneGet back to pristine, uninitialized state.
func
jax._src.compilation_cache.set_cache_dir(path) -> NoneSets the persistent compilation cache directory.
class
jax._src.compiler.CompilerEffortLevelEffort level enumeration for XLA.
func
jax._src.compiler.use_detailed_logging(module:ir.Module) -> boolReturns 'true' if detailed logging should be enabled for 'module'.
class
jax._src.config.ValueHolderA holder for a configuration value.
func
jax._src.config.bool_env(varname:str, default:bool) -> boolRead an environment variable and interpret it as a boolean.
func
jax._src.config.explicit_device_put_scope() -> Generator[None]Indicates that the current context is an explicit device_put*() call.
func
jax._src.config.int_env(varname:str, default:int) -> intRead an environment variable and interpret it as an integer.
class
jax._src.core.RefMutable array reference.
method
jax._src.core.Trace.stage_value(val)Lifts a value into a trace.
func
jax._src.core.canonicalize_shape(shape:Shape, context:str='') -> tuple[Any, ...]Canonicalizes and checks for errors in a user-provided shape value.
func
jax._src.core.canonicalize_slice(s:slice, axis_size:DimSize) -> tuple[DimSize, DimSize, DimSize]Computes the start index, step, and size of the slice `x[s]`.
func
jax._src.core.check_jaxpr(jaxpr:Jaxpr)Checks well-formedness of a jaxpr.
func
jax._src.core.concrete_or_error(force:Any, val:Any, context='')Like force(val), but gives the context in the error message.
func
jax._src.core.definitely_equal_shape(s1:Shape, s2:Shape) -> boolCheck that two shapes are guaranteed to be element-wise equal.
func
jax._src.core.dilate_dim(d:DimSize, dilation:DimSize) -> DimSizemax(0, 1 + dilation * (d - 1)).
func
jax._src.core.dim_value_dtype()The dtype to be used for dimension values.
func
jax._src.core.dimension_as_value(d:DimSize)Turns a dimension size into a JAX array.
func
jax._src.core.divide_shape_sizes(s1:Shape, s2:Shape) -> DimSizeReturns an integer "i" s.t., i * size(s2) == size(s1).
func
jax._src.core.evaluate_shape(shape:Shape, dim_vars:Sequence[str], *dim_values:Array) -> Sequence[Array]Evaluates a shape possibly containing non-constants.
func
jax._src.core.free_ref(ref:Ref)Invalidate a given reference.
func
jax._src.core.freeze(ref:Ref) -> ArrayInvalidate a given reference and return its final value.
func
jax._src.core.get_sharding(sharding, shape)Modifies and checks the sharding.
func
jax._src.core.is_symbolic_dim(v:Any) -> boolChecks if a value is a symbolic dimension used for shape polymorphism.
func
jax._src.core.max_dim(d1:DimSize, d2:DimSize) -> DimSizeLike max(d1, d2) but for both constant and symbolic dimensions.
func
jax._src.core.maybe_find_leaked_tracers(trace:Trace) -> list[Tracer]Find the leaked tracers holding a reference to the Trace
func
jax._src.core.mem_space_to_kind(mem_space:Any) -> strConverts a memory space to its corresponding XLA memory kind string.
func
jax._src.core.min_dim(d1:DimSize, d2:DimSize) -> DimSizeLike min(d1, d2) but for both constant and symbolic dimensions.
func
jax._src.core.subjaxprs(jaxpr:Jaxpr) -> Iterator[Jaxpr]Generator for all subjaxprs found in the params of jaxpr.eqns.
func
jax._src.core.typecompat(aval_ref:AbstractValue, aval:AbstractValue) -> boolDetermine whether `aval` conforms to `aval_ref`.
func
jax._src.core.typematch(t1:AbstractValue, t2:AbstractValue, no_dtype_check:bool=False) -> boolDetermine whether `t1` and `t2` are equivalent.
func
jax._src.core.typeof(x:Any) -> AnyReturn the JAX type (i.e.
func
jax._src.cudnn.fusion.cudnn_fusion(f)Makes a function become a cuDNN kernel.
class
jax._src.custom_batching.custom_vmapCustomize the vmap behavior of a JAX-transformable function.
method
jax._src.custom_batching.custom_vmap.def_vmap(vmap_rule:Callable[..., tuple[Any, Any]]) -> Callable[..., tuple[Any, Any]]Define the vmap rule for this custom_vmap function.
class
jax._src.custom_partitioning_sharding_rule.ArrayMappingDescribes the factors for an operand or result.
class
jax._src.custom_partitioning_sharding_rule.CompoundFactorDescribes the factors for a compound factor.
class
jax._src.custom_partitioning_sharding_rule.SdyShardingRuleRepresents a Shardy sharding rule.
class
jax._src.debugger.cli_debugger.CliDebuggerA text-based debugger.
method
jax._src.debugger.cli_debugger.CliDebugger.default(line)Evaluates an expression.
method
jax._src.debugger.cli_debugger.CliDebugger.do_down(arg)d(own) Move down a stack frame.
method
jax._src.debugger.cli_debugger.CliDebugger.do_quit(_)q(uit) (exit) Quit the debugger.
method
jax._src.debugger.cli_debugger.CliDebugger.do_up(arg)u(p) Move up a stack frame.
class
jax._src.debugger.colab_debugger.CodeViewerA mutable DOM element that displays code as HTML.
method
jax._src.debugger.colab_debugger.CodeViewer.update_code(code_, highlights, *linenostart:int=1)Updates the code viewer to use new code.
class
jax._src.debugger.colab_debugger.ColabDebuggerA JAX debugger for a Colab environment.
class
jax._src.debugger.colab_debugger.DebuggerViewMain view for the Colab debugger.
class
jax._src.debugger.colab_debugger.FramePreviewDisplays information about a stack frame.
class
jax._src.debugger.colab_lib.DynamicDOMElementA DOM element that can be mutated.
class
jax._src.debugger.colab_lib.DynamicDivA `div` that can be edited.
class
jax._src.debugger.colab_lib.StaticDOMElementAn immutable DOM element.
class
jax._src.debugger.core.DebuggerFrameEncapsulates Python frame information.
class
jax._src.debugger.web_debugger.WebDebuggerA web-based debugger.
func
jax._src.debugging.visualize_array_sharding(arr, **kwargs)Visualizes an array's sharding.
func
jax._src.deprecations.accelerate_getattr_deprecation(module:ModuleType, *names:str) -> NoneAccelerate the deprecation of a module-level attribute.
func
jax._src.deprecations.is_accelerated_attribute(module:ModuleType, name:str) -> boolReturns true if given name is accelerated.
func
jax._src.deprecations.warn(deprecation_id:str, message:str, stacklevel:int, *error_class:type[Exception]=ValueError) -> NoneWarns about a deprecation, or errors if the deprecation is accelerated.
func
jax._src.dispatch.jaxpr_has_primitive(jaxpr:core.Jaxpr, prim_name:str) -> boolWhether there is a primitive given by user anywhere inside a Jaxpr.
func
jax._src.distributed.is_initialized() -> boolCheck if the JAX distributed system is initialized.
func
jax._src.distributed.shutdown()Shuts down the distributed system.
func
jax._src.dlpack.is_supported_dtype(dtype:DTypeLike) -> boolCheck if dtype is supported by jax.dlpack.
class
jax._src.dtypes.ExtendedDTypeAbstract Base Class for extended dtypes
class
jax._src.dtypes.TypePromotionErrorRaised when JAX type promotion fails.
func
jax._src.dtypes.check_and_canonicalize_user_dtype(dtype, fun_name=None, *allow_non_jax_dtypes:bool=False) -> DTypeChecks validity of a user-provided dtype, and returns its canonical form.
func
jax._src.dtypes.coerce_to_array(x:Any, dtype:DTypeLike | None=None) -> np.ndarrayCoerces a scalar or NumPy array to an np.array.
func
jax._src.dtypes.dtype(x:Any) -> DTypeReturn the dtype object for a value or type.
class
jax._src.dtypes.extendedScalar class for extended dtypes.
func
jax._src.dtypes.issubdtype(a:DTypeLike | ExtendedDType | None, b:DTypeLike | ExtendedDType | None) -> boolReturns True if first argument is a typecode lower/equal in type hierarchy.
func
jax._src.dtypes.itemsize_bits(dtype:DTypeLike) -> intNumber of bits per element for the dtype.
func
jax._src.dtypes.jax_dtype(obj:DTypeLike | None, *align:bool=False, *copy:bool=False) -> DTypeCast an object to a dtype, respecting JAX dtype defaults.
class
jax._src.dtypes.prng_keyScalar class for PRNG Key dtypes.
func
jax._src.dtypes.promote_types(a:DTypeLike, b:DTypeLike) -> DTypeReturns the type to which a binary operation should cast its arguments.
func
jax._src.dtypes.register_weak_scalar_type(typ:type)Register a scalar type as a weak type.
func
jax._src.dtypes.scalar_type_of(x:Any) -> typeReturn the scalar type associated with a JAX value.
func
jax._src.dtypes.scalar_type_to_dtype(typ:type, value:Any=None) -> DTypeReturn the numpy dtype for the given scalar type.
func
jax._src.dtypes.supports_inf(dtype:DTypeLike) -> boolReturn true if the dtype supports infinity, else return False.
func
jax._src.dtypes.to_floating_dtype(dtype:DTypeLike) -> DTypePromotes a dtype to a non-complex floating dtype.
func
jax._src.dtypes.to_inexact_dtype(dtype:DTypeLike) -> DTypePromotes a dtype into an inexact dtype, if it is not already one.
func
jax._src.dtypes.to_numeric_dtype(dtype:DTypeLike) -> DTypePromotes a dtype into an numeric dtype, if it is not already one.
class
jax._src.effects.EffectA generic side-effect.
func
jax._src.error_check.raise_if_error() -> NoneRaise an exception if the internal error state is set.
func
jax._src.error_check.set_error_if(pred:Array, msg:str) -> NoneSet the internal error state if any element of `pred` is `True`.
class
jax._src.errors.JAXIndexErrorJAX-specific :class:`IndexError`
class
jax._src.errors.JAXTypeErrorJAX-specific :class:`TypeError`
class
jax._src.errors.KeyReuseErrorThis error occurs when a PRNG key is reused in an unsafe manner.
class
jax._src.export._export.DisabledSafetyCheckA safety check that should be skipped on (de)serialization.
class
jax._src.export._export.ExportedA JAX function lowered to StableHLO.
method
jax._src.export._export.Exported.has_vjp() -> boolReturns if this Exported supports VJP.
method
jax._src.export._export.Exported.mlir_module(serialized:bool=True) -> AnyA string or Module representation of the ``mlir_module_serialized``.
method
jax._src.export._export.Exported.serialize(vjp_order:int=0) -> bytearraySerializes an Exported.
method
jax._src.export._export.Exported.vjp() -> ExportedGets the exported VJP.
func
jax._src.export._export.default_export_platform() -> strRetrieves the default export platform.
func
jax._src.export._export.deserialize(blob:bytearray) -> ExportedDeserializes an Exported.
func
jax._src.export.serialization.deserialize(ser:bytearray) -> _export.ExportedDeserializes an Exported.
func
jax._src.export.serialization.serialize(exp:_export.Exported, vjp_order:int=0) -> bytearraySerializes an Exported.
method
jax._src.export.serialization_generated.Effect.GetRootAsEffect(buf, offset=0)This method is deprecated.
method
jax._src.export.serialization_generated.Exported.GetRootAsExported(buf, offset=0)This method is deprecated.
method
jax._src.export.serialization_generated.Sharding.GetRootAsSharding(buf, offset=0)This method is deprecated.
class
jax._src.export.shape_poly.BoundsPrecisionSpecifies desired precision for the bounds calculation.
class
jax._src.export.shape_poly.PolyShapeTuple of polymorphic dimension specifications.
class
jax._src.export.shape_poly.SymbolicScopeIdentifies a scope for symbolic expressions.
func
jax._src.export.shape_poly.cmp_sequence(s1, s2, elem_cmp) -> intCompares two sequences using `elem_cmp`.
func
jax._src.export.shape_poly.is_symbolic_dim(p:DimSize) -> TypeGuard[_DimExpr]Checks if a dimension is symbolic.
func
jax._src.export.shape_poly.shape_assertion(assert_what:typing.Array, *error_message:str, *error_message_inputs:typing.Array) -> NoneAdds a shape assertion in the code.
class
jax._src.ffi.TypeRegistrationA dictionary type for registering FFI types.
func
jax._src.ffi.register_ffi_target(name:str, fn:Any, platform:str='cpu', api_version:int=1, **kwargs:Any) -> NoneRegisters a foreign function target.
func
jax._src.ffi.register_ffi_target_as_batch_partitionable(name:str) -> NoneRegisters an FFI target as batch partitionable.
func
jax._src.ffi.register_ffi_type(name:str, type_registration:TypeRegistration, platform:str='cpu') -> NoneRegisters a custom type for a FFI target.
func
jax._src.ffi.register_ffi_type_id(name:str, obj:Any, platform:str='cpu') -> NoneRegisters a custom type ID for a FFI target.
func
jax._src.flatten_util.ravel_pytree(pytree:Any) -> tuple[Array, Callable[[Array], Any]]Ravel (flatten) a pytree of arrays down to a 1D array.
class
jax._src.flattree.FlatTreeFlatTree is a Python OOP version of this functor.
func
jax._src.hardware_utils.get_shm_size_in_mb()Get /dev/shm size in MB.
func
jax._src.hardware_utils.num_available_amd_gpus(stop_at:int | None=None) -> intCount AMD GPUs available via KFD kernel driver.
class
jax._src.hypothesis_test_util.HypothesisShardedTestCaseRuns Hypothesis tests in a sharded manner.
class
jax._src.hypothesis_test_util.HypothesisShardedTestLoaderA TestLoader that bypasses method-level sharding.
func
jax._src.hypothesis_test_util.setup_hypothesis(max_examples=30) -> NoneSets up the hypothesis profiles.
class
jax._src.image.scale.ResizeMethodImage resize method.
func
jax._src.image.scale.resize(image, shape:core.Shape, method:str | ResizeMethod, antialias:bool=True, precision=lax.Precision.HIGHEST)Image resize.
class
jax._src.indexing.SliceA slice with a start index and a size.
class
jax._src.interpreters.mlir.LoweringRuleContextPer-rule context information for MLIR lowering.
class
jax._src.interpreters.mlir.ModuleContextModule-wide context information for MLIR lowering.
func
jax._src.interpreters.mlir.aval_to_ir_type(ctx:ModuleContext, aval:core.AbstractValue) -> ir.TypeConverts a JAX aval to a single MLIR IR type.
func
jax._src.interpreters.mlir.aval_to_ir_types(ctx:ModuleContext, aval:core.AbstractValue) -> tuple[ir.Type, ...]Converts a JAX aval to one or more MLIR IR types.
func
jax._src.interpreters.mlir.compare_hlo(x, y, direction:str, comparison_type:str | None=None)Creates CompareOp.
func
jax._src.interpreters.mlir.convert_hlo(ctx:LoweringRuleContext, x, aval_in, aval_out)Variant of convert that has HLO semantics.
func
jax._src.interpreters.mlir.delegate_lowering(ctx, lowering_fun, *args, **ctx_override_kwargs)Side-effects on `ctx`
func
jax._src.interpreters.mlir.dump_module_to_file(module:ir.Module, stage_name:str) -> str | NoneDumps the `module` IR to a file.
func
jax._src.interpreters.mlir.eval_dynamic_shape_as_tensor(ctx:LoweringRuleContext, shape:core.Shape) -> ir.ValueEvaluates the dynamic shapes as one 1d int32 tensor.
func
jax._src.interpreters.mlir.eval_dynamic_shape_as_vals(ctx:LoweringRuleContext, shape:core.Shape) -> tuple[ir.Value, ...]Evaluates the dynamic shapes as int32 values.
func
jax._src.interpreters.mlir.ir_attribute(val:Any) -> ir.AttributeConvert a Python value to an MLIR attribute.
func
jax._src.interpreters.mlir.lower_fun(fun:Callable, multiple_results:bool=True) -> CallableConverts a traceable JAX function `fun` into a lowering rule.
func
jax._src.interpreters.mlir.make_ir_context() -> ir.ContextCreates an MLIR context suitable for JAX IR.
func
jax._src.interpreters.mlir.refine_polymorphic_shapes(module:ir.Module) -> ir.ModuleRefines the polymorphic shapes inside a module.
func
jax._src.interpreters.mlir.register_lowering(prim:core.Primitive, rule:LoweringRule, platform:str | None=None, inline:bool=True, cacheable:bool=True) -> NoneRegisters a lowering rule for a primitive.
func
jax._src.interpreters.mlir.sanitize_name(name:str) -> strEnsure a name is usable as module or function name.
func
jax._src.interpreters.mlir.sharded_aval(aval:core.AbstractValue, sharding:JSharding | None) -> core.AbstractValueReturns the new aval sharded based on sharding proto.
func
jax._src.interpreters.partial_eval.convert_constvars_jaxpr(jaxpr:Jaxpr) -> JaxprDetaches the consts, exposing the constant inputs as leading invars.
func
jax._src.interpreters.partial_eval.dce_jaxpr(jaxpr:Jaxpr, used_outputs:bool | Sequence[bool], instantiate:bool | Sequence[bool]=False) -> tuple[Jaxpr, list[bool]]Runs dead-code elementation on a given jaxpr.
func
jax._src.interpreters.partial_eval.separate_consts(jaxpr:Jaxpr) -> tuple[Jaxpr, list[Any]]Detaches the consts and returns them explicitly.
class
jax._src.interpreters.pxla.AllArgsInfoAvals and debug_info for all arguments prior to DCE.
func
jax._src.interpreters.pxla.clear_in_memory_compilation_cache() -> NoneClears the in-memory compilation cache.
func
jax._src.jaxpr_util.eqns_using_var(jaxpr:core.Jaxpr, invar:core.Var) -> Iterator[core.JaxprEqn]Find the leaf equations using a variable
func
jax._src.jaxpr_util.jaxpr_to_html(jaxpr:core.Jaxpr) -> strRenders a Jaxpr as HTML with interactive tracebacks and search.
func
jax._src.jaxpr_util.maybe_dump_jaxpr_to_file(fun_name:str, jaxpr:core.Jaxpr) -> str | NoneMaybe dumps the `jaxpr` to a file.
class
jax._src.lax.control_flow.conditionals.CondSumA cond-shaped sum, represented as a tagged product.
func
jax._src.lax.control_flow.loops.cumlogsumexp(operand:Array, axis:int=0, reverse:bool=False) -> ArrayComputes a cumulative logsumexp along `axis`.
func
jax._src.lax.control_flow.loops.cummax(operand:Array, axis:int=0, reverse:bool=False) -> ArrayComputes a cumulative maximum along `axis`.
func
jax._src.lax.control_flow.loops.cummin(operand:Array, axis:int=0, reverse:bool=False) -> ArrayComputes a cumulative minimum along `axis`.
func
jax._src.lax.control_flow.loops.cumprod(operand:Array, axis:int=0, reverse:bool=False) -> ArrayComputes a cumulative product along `axis`.
func
jax._src.lax.control_flow.loops.cumsum(operand:Array, axis:int=0, reverse:bool=False) -> ArrayComputes a cumulative sum along `axis`.
func
jax._src.lax.control_flow.loops.map(f, xs, *batch_size:int | None=None)Map a function over leading array axes.
func
jax._src.lax.eval_jaxpr.create_call_primitive(name:str) -> core.PrimitiveCreates a JAX Primitive with standard call rules registered.
class
jax._src.lax.fft.FftTypeDescribes which FFT operation to perform.
class
jax._src.lax.lax.DotAlgorithmSpecify the algorithm used for computing dot products.
class
jax._src.lax.lax.DotAlgorithmPresetAn enum of known algorithms for computing dot products.
class
jax._src.lax.lax.PrecisionPrecision enum for lax matrix multiply related functions.
class
jax._src.lax.lax.RandomAlgorithmDescribes which PRNG algorithm to use for rng_bit_generator.
class
jax._src.lax.lax.ToleranceSpecify the tolerances used for computing unary functions.
func
jax._src.lax.lax.abs(x:ArrayLike) -> ArrayElementwise absolute value: :math:`|x|`.
func
jax._src.lax.lax.acos(x:ArrayLike) -> ArrayElementwise arc cosine: :math:`\mathrm{acos}(x)`.
func
jax._src.lax.lax.acosh(x:ArrayLike) -> ArrayElementwise inverse hyperbolic cosine: :math:`\mathrm{acosh}(x)`.
func
jax._src.lax.lax.add(x:ArrayLike, y:ArrayLike) -> ArrayElementwise addition: :math:`x + y`.
func
jax._src.lax.lax.after_all(*operands)Merges one or more XLA token values.
func
jax._src.lax.lax.argmax(operand:ArrayLike, axis:int, index_dtype:DTypeLike) -> ArrayComputes the index of the maximum element along ``axis``.
func
jax._src.lax.lax.argmin(operand:ArrayLike, axis:int, index_dtype:DTypeLike) -> ArrayComputes the index of the minimum element along ``axis``.
func
jax._src.lax.lax.asarray(x:ArrayLike) -> ArrayLightweight conversion of ArrayLike input to Array output.
func
jax._src.lax.lax.asin(x:ArrayLike) -> ArrayElementwise arc sine: :math:`\mathrm{asin}(x)`.
func
jax._src.lax.lax.asinh(x:ArrayLike) -> ArrayElementwise inverse hyperbolic sine: :math:`\mathrm{asinh}(x)`.
func
jax._src.lax.lax.atan(x:ArrayLike) -> ArrayElementwise arc tangent: :math:`\mathrm{atan}(x)`.
func
jax._src.lax.lax.atan2(x:ArrayLike, y:ArrayLike) -> ArrayElementwise two-term arc tangent: :math:`\mathrm{atan}({x \over y})`.
func
jax._src.lax.lax.atanh(x:ArrayLike) -> ArrayElementwise inverse hyperbolic tangent: :math:`\mathrm{atanh}(x)`.
func
jax._src.lax.lax.batch_matmul(lhs:Array, rhs:Array, precision:PrecisionLike=None) -> ArrayBatch matrix multiplication.
func
jax._src.lax.lax.bitcast_convert_type(operand:ArrayLike, new_dtype:DTypeLike) -> ArrayElementwise bitcast.
func
jax._src.lax.lax.bitwise_and(x:ArrayLike, y:ArrayLike) -> ArrayElementwise AND: :math:`x \wedge y`.
func
jax._src.lax.lax.bitwise_not(x:ArrayLike) -> ArrayElementwise NOT: :math:`\neg x`.
func
jax._src.lax.lax.bitwise_or(x:ArrayLike, y:ArrayLike) -> ArrayElementwise OR: :math:`x \vee y`.
func
jax._src.lax.lax.bitwise_xor(x:ArrayLike, y:ArrayLike) -> ArrayElementwise exclusive OR: :math:`x \oplus y`.
func
jax._src.lax.lax.broadcast(operand:ArrayLike, sizes:Sequence[int], *out_sharding=None) -> ArrayBroadcasts an array, adding new leading dimensions only.
func
jax._src.lax.lax.broadcast_in_dim(operand:ArrayLike, shape:Shape, broadcast_dimensions:Sequence[int], *out_sharding=None) -> ArrayGeneral broadcasting operation.
func
jax._src.lax.lax.broadcast_to_rank(x:ArrayLike, rank:int) -> ArrayAdds leading dimensions of ``1`` to give ``x`` rank ``rank``.
func
jax._src.lax.lax.broadcasted_iota(dtype:DTypeLike, shape:Shape, dimension:int, *out_sharding=None) -> ArrayConvenience wrapper around ``iota``.
func
jax._src.lax.lax.canonicalize_precision(precision:PrecisionLike) -> CanonicalPrecisionTurns an API precision specification into a pair of enumeration values.
func
jax._src.lax.lax.cbrt(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise cube root: :math:`\sqrt[3]{x}`.
func
jax._src.lax.lax.ceil(x:ArrayLike) -> ArrayElementwise ceiling: :math:`\left\lceil x \right\rceil`.
func
jax._src.lax.lax.check_same_dtypes(name:str, *avals:ShapedArray) -> NoneCheck that dtypes agree, possibly ignoring float precision.
func
jax._src.lax.lax.clamp(min:ArrayLike, x:ArrayLike, max:ArrayLike) -> ArrayElementwise clamp.
func
jax._src.lax.lax.clz(x:ArrayLike) -> ArrayElementwise count-leading-zeros.
func
jax._src.lax.lax.collapse(operand:Array, start_dimension:int, stop_dimension:int | None=None) -> ArrayCollapses dimensions of an array into a single dimension.
func
jax._src.lax.lax.complex(x:ArrayLike, y:ArrayLike) -> ArrayElementwise make complex number: :math:`x + jy`.
func
jax._src.lax.lax.concatenate(operands:Array | Sequence[ArrayLike], dimension:int) -> ArrayConcatenates a sequence of arrays along `dimension`.
func
jax._src.lax.lax.conj(x:ArrayLike) -> ArrayElementwise complex conjugate function: :math:`\overline{x}`.
func
jax._src.lax.lax.convert_element_type(operand:ArrayLike, new_dtype:DTypeLike | dtypes.ExtendedDType) -> ArrayElementwise cast.
func
jax._src.lax.lax.cos(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise cosine: :math:`\mathrm{cos}(x)`.
func
jax._src.lax.lax.cosh(x:ArrayLike) -> ArrayElementwise hyperbolic cosine: :math:`\mathrm{cosh}(x)`.
func
jax._src.lax.lax.div(x:ArrayLike, y:ArrayLike) -> ArrayElementwise division: :math:`x \over y`.
func
jax._src.lax.lax.dot(lhs:ArrayLike, rhs:ArrayLike, *dimension_numbers:DotDimensionNumbers | None=None, *precision:PrecisionLike=None, *preferred_element_type:DTypeLike | None=None, *out_sharding=None) -> ArrayGeneral dot product/contraction operator.
func
jax._src.lax.lax.dot_general(lhs:ArrayLike, rhs:ArrayLike, dimension_numbers:DotDimensionNumbers, precision:PrecisionLike=None, preferred_element_type:DTypeLike | None=None, *out_sharding=None) -> ArrayAlias of :func:`jax.lax.dot`.
func
jax._src.lax.lax.eq(x:ArrayLike, y:ArrayLike) -> ArrayElementwise equals: :math:`x = y`.
func
jax._src.lax.lax.exp(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise exponential: :math:`e^x`.
func
jax._src.lax.lax.exp2(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise base-2 exponential: :math:`2^x`.
func
jax._src.lax.lax.expand_dims(array:ArrayLike, dimensions:Sequence[int]) -> ArrayInsert any number of size 1 dimensions into an array.
func
jax._src.lax.lax.expm1(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise :math:`e^{x} - 1`.
func
jax._src.lax.lax.floor(x:ArrayLike) -> ArrayElementwise floor: :math:`\left\lfloor x \right\rfloor`.
func
jax._src.lax.lax.full(shape:Shape, fill_value:ArrayLike, dtype:DTypeLike | None=None, *sharding:Sharding | None=None) -> ArrayReturns an array of `shape` filled with `fill_value`.
func
jax._src.lax.lax.ge(x:ArrayLike, y:ArrayLike) -> ArrayElementwise greater-than-or-equals: :math:`x \geq y`.
func
jax._src.lax.lax.gt(x:ArrayLike, y:ArrayLike) -> ArrayElementwise greater-than: :math:`x > y`.
func
jax._src.lax.lax.imag(x:ArrayLike) -> ArrayElementwise extract imaginary part: :math:`\mathrm{Im}(x)`.
func
jax._src.lax.lax.integer_pow(x:ArrayLike, y:int) -> ArrayElementwise power: :math:`x^y`, where :math:`y` is a static integer.
func
jax._src.lax.lax.is_finite(x:ArrayLike) -> ArrayElementwise :math:`\mathrm{isfinite}`.
func
jax._src.lax.lax.le(x:ArrayLike, y:ArrayLike) -> ArrayElementwise less-than-or-equals: :math:`x \leq y`.
func
jax._src.lax.lax.log(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise natural logarithm: :math:`\mathrm{log}(x)`.
func
jax._src.lax.lax.log1p(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise :math:`\mathrm{log}(1 + x)`.
func
jax._src.lax.lax.lt(x:ArrayLike, y:ArrayLike) -> ArrayElementwise less-than: :math:`x < y`.
func
jax._src.lax.lax.max(x:ArrayLike, y:ArrayLike) -> ArrayElementwise maximum: :math:`\mathrm{max}(x, y)`.
func
jax._src.lax.lax.mul(x:ArrayLike, y:ArrayLike, *out_dtype:DTypeLike | None=None) -> ArrayElementwise multiplication: :math:`x \times y`.
func
jax._src.lax.lax.mulhi(x:ArrayLike, y:ArrayLike) -> ArrayElementwise multiply-high: high bits of :math:`x \times y`.
func
jax._src.lax.lax.ne(x:ArrayLike, y:ArrayLike) -> ArrayElementwise not-equals: :math:`x \neq y`.
func
jax._src.lax.lax.neg(x:ArrayLike) -> ArrayElementwise negation: :math:`-x`.
func
jax._src.lax.lax.pad(operand:ArrayLike, padding_value:ArrayLike, padding_config:Sequence[tuple[int, int, int]]) -> ArrayApplies low, high, and/or interior padding to an array.
func
jax._src.lax.lax.population_count(x:ArrayLike) -> ArrayElementwise popcount, count the number of set bits in each element.
func
jax._src.lax.lax.pow(x:ArrayLike, y:ArrayLike) -> ArrayElementwise power: :math:`x^y`.
func
jax._src.lax.lax.ragged_dot(lhs:Array, rhs:Array, group_sizes:Array, precision:PrecisionLike=None, preferred_element_type:DTypeLike | None=None, group_offset:Array | None=None, out_sharding:NamedSharding | P | None=None) -> ArrayRagged matrix multiplication.
func
jax._src.lax.lax.real(x:ArrayLike) -> ArrayElementwise extract real part: :math:`\mathrm{Re}(x)`.
func
jax._src.lax.lax.reciprocal(x:ArrayLike) -> ArrayElementwise reciprocal: :math:`1 \over x`.
func
jax._src.lax.lax.reduce_and(operand:ArrayLike, axes:Sequence[int]) -> ArrayCompute the bitwise AND of elements over one or more array axes.
func
jax._src.lax.lax.reduce_max(operand:ArrayLike, axes:Sequence[int], *out_sharding=None) -> ArrayCompute the maximum of elements over one or more array axes.
func
jax._src.lax.lax.reduce_min(operand:ArrayLike, axes:Sequence[int], *out_sharding=None) -> ArrayCompute the minimum of elements over one or more array axes.
func
jax._src.lax.lax.reduce_or(operand:ArrayLike, axes:Sequence[int]) -> ArrayCompute the bitwise OR of elements over one or more array axes.
func
jax._src.lax.lax.reduce_prod(operand:ArrayLike, axes:Sequence[int]) -> ArrayCompute the product of elements over one or more array axes.
func
jax._src.lax.lax.reduce_sum(operand:ArrayLike, axes:Sequence[int], *out_sharding=None) -> ArrayCompute the sum of elements over one or more array axes.
func
jax._src.lax.lax.reduce_xor(operand:ArrayLike, axes:Sequence[int]) -> ArrayCompute the bitwise XOR of elements over one or more array axes.
func
jax._src.lax.lax.rem(x:ArrayLike, y:ArrayLike) -> ArrayElementwise remainder: :math:`x \bmod y`.
func
jax._src.lax.lax.rng_uniform(a, b, shape)Stateful PRNG generator.
func
jax._src.lax.lax.round(x:ArrayLike, rounding_method:RoundingMethod=RoundingMethod.AWAY_FROM_ZERO) -> ArrayElementwise round.
func
jax._src.lax.lax.rsqrt(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise reciprocal square root: :math:`1 \over \sqrt{x}`.
func
jax._src.lax.lax.select(pred:ArrayLike, on_true:ArrayLike, on_false:ArrayLike) -> ArraySelects between two branches based on a boolean predicate.
func
jax._src.lax.lax.select_n(which:ArrayLike, *cases:ArrayLike) -> ArraySelects array values from multiple cases.
func
jax._src.lax.lax.shift_left(x:ArrayLike, y:ArrayLike) -> ArrayElementwise left shift: :math:`x \ll y`.
func
jax._src.lax.lax.shift_right_arithmetic(x:ArrayLike, y:ArrayLike) -> ArrayElementwise arithmetic right shift: :math:`x \gg y`.
func
jax._src.lax.lax.shift_right_logical(x:ArrayLike, y:ArrayLike) -> ArrayElementwise logical right shift: :math:`x \gg y`.
func
jax._src.lax.lax.sign(x:ArrayLike) -> ArrayElementwise sign.
func
jax._src.lax.lax.sin(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise sine: :math:`\mathrm{sin}(x)`.
func
jax._src.lax.lax.sinh(x:ArrayLike) -> ArrayElementwise hyperbolic sine: :math:`\mathrm{sinh}(x)`.
func
jax._src.lax.lax.split(operand:ArrayLike, sizes:Sequence[DimSize], axis:int=0) -> Sequence[Array]Splits an array along ``axis``.
func
jax._src.lax.lax.sqrt(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise square root: :math:`\sqrt{x}`.
func
jax._src.lax.lax.square(x:ArrayLike) -> ArrayElementwise square: :math:`x^2`.
func
jax._src.lax.lax.squeeze(array:ArrayLike, dimensions:Sequence[int]) -> ArraySqueeze any number of size 1 dimensions from an array.
func
jax._src.lax.lax.stack(operands:Sequence[ArrayLike], axis:int=0) -> ArrayJoins a sequence of arrays along a new axis.
func
jax._src.lax.lax.stage(x:ArrayLike) -> ArrayLifts a value into a trace.
func
jax._src.lax.lax.stop_gradient(x:T) -> TStops gradient computation.
func
jax._src.lax.lax.sub(x:ArrayLike, y:ArrayLike) -> ArrayElementwise subtraction: :math:`x - y`.
func
jax._src.lax.lax.tan(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise tangent: :math:`\mathrm{tan}(x)`.
func
jax._src.lax.lax.tanh(x:ArrayLike, *accuracy:Tolerance | AccuracyMode | None=None) -> ArrayElementwise hyperbolic tangent: :math:`\mathrm{tanh}(x)`.
func
jax._src.lax.lax.tile(operand:ArrayLike, reps:Sequence[int]) -> ArrayTiles an array by repeating it along each dimension.
func
jax._src.lax.lax.unstack(x:ArrayLike, axis:int=0) -> tuple[Array, ...]Unstacks an array along an axis.
class
jax._src.lax.linalg.EigImplementationEnum for eigendecomposition algorithm.
class
jax._src.lax.linalg.EighImplementationImplementation for symmetric/Hermitian eigendecomposition.
class
jax._src.lax.linalg.SvdAlgorithmEnum for SVD algorithm.
func
jax._src.lax.linalg.cholesky(x:Array, *symmetrize_input:bool=True) -> ArrayCholesky decomposition.
func
jax._src.lax.linalg.cholesky_update(r_matrix:ArrayLike, w_vector:ArrayLike) -> ArrayCholesky rank-1 update.
func
jax._src.lax.linalg.geqp3(a:ArrayLike, jpvt:ArrayLike, *use_magma:bool | None=None) -> tuple[Array, Array, Array]Computes the column-pivoted QR decomposition of a matrix.
func
jax._src.lax.linalg.geqrf(a:ArrayLike) -> tuple[Array, Array]Computes the QR decomposition of a matrix.
func
jax._src.lax.linalg.hessenberg(a:ArrayLike) -> tuple[Array, Array]Reduces a square matrix to upper Hessenberg form.
func
jax._src.lax.linalg.householder_product(a:ArrayLike, taus:ArrayLike) -> ArrayProduct of elementary Householder reflectors.
func
jax._src.lax.linalg.lu(x:ArrayLike) -> tuple[Array, Array, Array]LU decomposition with partial pivoting.
func
jax._src.lax.linalg.lu_solve(lu:ArrayLike, permutation:ArrayLike, b:ArrayLike, trans:int=0) -> ArrayLU solve with broadcasting.
func
jax._src.lax.linalg.schur(x:ArrayLike, *compute_schur_vectors:bool=True, *sort_eig_vals:bool=False, *select_callable:Callable[..., Any] | None=None) -> tuple[Array, Array]Schur decomposition.
func
jax._src.lax.linalg.symmetric_product(a_matrix:ArrayLike, c_matrix:ArrayLike, *alpha:float=1.0, *beta:float=0.0, *symmetrize_output:bool=False)Symmetric product.
func
jax._src.lax.linalg.triangular_solve(a:ArrayLike, b:ArrayLike, *left_side:bool=False, *lower:bool=False, *transpose_a:bool=False, *conjugate_a:bool=False, *unit_diagonal:bool=False) -> ArrayTriangular solve.
func
jax._src.lax.linalg.tridiagonal(a:ArrayLike, *lower:bool=True) -> tuple[Array, Array, Array, Array]Reduces a symmetric/Hermitian matrix to tridiagonal form.
func
jax._src.lax.linalg.tridiagonal_solve(dl:Array, d:Array, du:Array, b:Array, *perturb_singular:bool=False) -> ArrayComputes the solution of a tridiagonal linear system.
func
jax._src.lax.other.logaddexp(x1:ArrayLike, x2:ArrayLike) -> ArrayCompute log(exp(x1) + exp(x2)) avoiding overflow.
func
jax._src.lax.other.logaddexp2(x1:ArrayLike, x2:ArrayLike) -> ArrayCompute log2(exp2(x1) + exp2(x2)) avoiding overflow.
func
jax._src.lax.parallel.all_gather(x, axis_name, *axis_index_groups=None, *axis=0, *tiled=False, *to:str='varying')Gather values of x across all replicas.
func
jax._src.lax.parallel.all_gather_invariant(x, axis_name, *axis:int=0, *tiled:bool=False)Gather values of x across all replicas.
func
jax._src.lax.parallel.axis_index(axis_name:AxisName) -> ArrayReturn the index along the mapped axis ``axis_name``.
func
jax._src.lax.parallel.axis_size(axis_name:AxisName) -> intReturn the size of the mapped axis ``axis_name``.
func
jax._src.lax.slicing.gather(operand:ArrayLike, start_indices:ArrayLike, dimension_numbers:GatherDimensionNumbers, slice_sizes:Shape, *unique_indices:bool=False, *indices_are_sorted:bool=False, *mode:str | GatherScatterMode | None=None, *fill_value=None) -> ArrayGather operator.
func
jax._src.lax.slicing.scatter(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-update operator.
func
jax._src.lax.slicing.scatter_add(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-add operator.
func
jax._src.lax.slicing.scatter_max(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-max operator.
func
jax._src.lax.slicing.scatter_min(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-min operator.
func
jax._src.lax.slicing.scatter_mul(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-multiply operator.
func
jax._src.lax.slicing.scatter_sub(operand:ArrayLike, scatter_indices:ArrayLike, updates:ArrayLike, dimension_numbers:ScatterDimensionNumbers, *indices_are_sorted:bool=False, *unique_indices:bool=False, *mode:str | GatherScatterMode | None=None) -> ArrayScatter-sub operator.
func
jax._src.lax.special.betainc(a:ArrayLike, b:ArrayLike, x:ArrayLike) -> ArrayElementwise regularized incomplete beta integral.
func
jax._src.lax.special.digamma(x:ArrayLike) -> ArrayElementwise digamma: :math:`\psi(x)`.
func
jax._src.lax.special.erf(x:ArrayLike) -> ArrayElementwise error function: :math:`\mathrm{erf}(x)`.
func
jax._src.lax.special.erf_inv(x:ArrayLike) -> ArrayElementwise inverse error function: :math:`\mathrm{erf}^{-1}(x)`.
func
jax._src.lax.special.igamma(a:ArrayLike, x:ArrayLike) -> ArrayElementwise regularized incomplete gamma function.
func
jax._src.lax.special.igamma_grad_a(a:ArrayLike, x:ArrayLike) -> ArrayElementwise derivative of the regularized incomplete gamma function.
func
jax._src.lax.special.igammac(a:ArrayLike, x:ArrayLike) -> ArrayElementwise complementary regularized incomplete gamma function.
func
jax._src.lax.special.lgamma(x:ArrayLike) -> ArrayElementwise log gamma: :math:`\mathrm{log}(\Gamma(x))`.
func
jax._src.lax.special.ndtr(x:Array) -> ArrayElementwise cumulative distribution function of the standard normal.
func
jax._src.lax.special.polygamma(m:ArrayLike, x:ArrayLike) -> ArrayElementwise polygamma: :math:`\psi^{(m)}(x)`.
func
jax._src.lax.special.random_gamma_grad(a:ArrayLike, x:ArrayLike, *dtype) -> ArrayElementwise derivative of samples from `Gamma(a, 1)`.
func
jax._src.lax.special.zeta(x:ArrayLike, q:ArrayLike) -> ArrayElementwise Hurwitz zeta function: :math:`\zeta(x, q)`
func
jax._src.lax.utils.index_dtype_for_axis_size(indices_dtype:DType, axis_size:DimSize, wrap_negative_indices:bool) -> DTypeUpcast indices_dtype if necessary to avoid overflow.
func
jax._src.lax.utils.int_dtype_for_dim(d:DimSize, *signed:bool) -> DTypeReturns a integer dtype large enough to contain indices in dimension d.
func
jax._src.lax.utils.int_dtype_for_shape(shape:Shape, *signed:bool) -> DTypeReturns a integer dtype large enough to contain indices in `shape`.
func
jax._src.lax_reference.ragged_dot(lhs, rhs, group_sizes)Reference ragged dot implementation.
func
jax._src.lazy_loader.attach(package_name:str, submodules:Sequence[str]) -> tuple[Callable[[str], Any], Callable[[], list[str]], list[str]]Lazily loads submodules of a package.
class
jax._src.linear_util.DebugInfoDebugging info about a func, its arguments, and results.
method
jax._src.linear_util.DebugInfo.filter_arg_names(keep:Sequence[bool]) -> tuple[str, ...] | NoneKeep only the arg_names for which `keep` is True.
method
jax._src.linear_util.DebugInfo.filter_result_paths(keep:Sequence[bool]) -> tuple[str, ...] | NoneKeep only the result_paths for which `keep` is True.
method
jax._src.linear_util.DebugInfo.resolve_result_paths() -> DebugInfoReturn a debug info with resolved result paths.
method
jax._src.linear_util.DebugInfo.safe_arg_names(expected_count:int) -> tuple[str, ...]Get the arg_names with a safety check.
method
jax._src.linear_util.DebugInfo.safe_result_paths(expected_count:int) -> tuple[str, ...]Get the result paths with a safety check.
class
jax._src.linear_util.WrappedFunRepresents a function `f` to which `transforms` are to be applied.
method
jax._src.linear_util.WrappedFun.call_wrapped(*args, **kwargs)Calls the transformed function
method
jax._src.linear_util.WrappedFun.wrap(gen, gen_static_args, out_store:Store | EqualStore | None) -> WrappedFunAdd another transform and its store.
func
jax._src.linear_util.transformation2(gen, fun:WrappedFun, *gen_static_args) -> WrappedFunAdds one more transformation to a WrappedFun.
func
jax._src.linear_util.wrap_init(f:Callable, params=None, *debug_info:DebugInfo) -> WrappedFunWraps function `f` as a `WrappedFun`, suitable for transformation.
class
jax._src.literals.TypedNdArrayA TypedNdArray is a host-side array used by JAX during tracing.
class
jax._src.lru_cache.LRUCacheBounded cache with least-recently-used (LRU) eviction policy.
method
jax._src.lru_cache.LRUCache.get(key:str) -> bytes | NoneRetrieves the cached value for the given key.
method
jax._src.lru_cache.LRUCache.put(key:str, value:bytes) -> NoneAdds a new entry to the cache.
class
jax._src.mesh.AbstractMeshAbstractMesh contains only axis names and axis sizes.
class
jax._src.mesh.use_abstract_meshSets a abstract mesh in a thread-local context.
func
jax._src.monitoring.clear_event_listeners()Clear event listeners.
func
jax._src.monitoring.get_event_duration_listeners() -> list[EventDurationListenerWithMetadata]Get event duration listeners.
func
jax._src.monitoring.get_event_listeners() -> list[EventListenerWithMetadata]Get event listeners.
func
jax._src.monitoring.get_event_time_span_listeners() -> list[EventTimeSpanListenerWithMetadata]Get event time span listeners.
func
jax._src.monitoring.get_scalar_listeners() -> list[ScalarListenerWithMetadata]Get scalar event listeners.
func
jax._src.monitoring.record_event(event:str, **kwargs:str | int) -> NoneRecord an event.
func
jax._src.monitoring.record_event_duration_secs(event:str, duration:float, **kwargs:str | int) -> NoneRecord an event duration in seconds (float).
func
jax._src.monitoring.record_event_time_span(event:str, start_time:float, end_time:float, **kwargs:str | int) -> NoneRecord an event start and end time in seconds (float).
func
jax._src.monitoring.record_scalar(event:str, value:float | int, **kwargs:str | int) -> NoneRecord a scalar summary value.
func
jax._src.monitoring.register_event_listener(callback:EventListenerWithMetadata) -> NoneRegister a callback to be invoked during record_event().
func
jax._src.monitoring.register_scalar_listener(callback:ScalarListenerWithMetadata) -> NoneRegister a callback to be invoked during record_scalar().
func
jax._src.monitoring.unregister_event_duration_listener(callback:EventDurationListenerWithMetadata) -> NoneUnregister an event duration listener by callback.
func
jax._src.monitoring.unregister_event_listener(callback:EventListenerWithMetadata) -> NoneUnregister an event listener by callback.
func
jax._src.monitoring.unregister_event_time_span_listener(callback:EventTimeSpanListenerWithMetadata) -> NoneUnregister an event time span listener by callback.
func
jax._src.monitoring.unregister_scalar_listener(callback:ScalarListenerWithMetadata) -> NoneUnregister a scalar event listener by callback.
class
jax._src.named_sharding.NamedShardingA :class:`NamedSharding` expresses sharding using named axes.
func
jax._src.nn.functions.celu(x:ArrayLike, alpha:ArrayLike=1.0) -> ArrayContinuously-differentiable exponential linear unit activation.
func
jax._src.nn.functions.elu(x:ArrayLike, alpha:ArrayLike=1.0) -> ArrayExponential linear unit activation function.
func
jax._src.nn.functions.gelu(x:ArrayLike, approximate:bool=True) -> ArrayGaussian error linear unit activation function.
func
jax._src.nn.functions.glu(x:ArrayLike, axis:int=-1) -> ArrayGated linear unit activation function.
func
jax._src.nn.functions.hard_sigmoid(x:ArrayLike) -> ArrayHard Sigmoid activation function.
func
jax._src.nn.functions.hard_tanh(x:ArrayLike) -> ArrayHard :math:`\mathrm{tanh}` activation function.
func
jax._src.nn.functions.identity(x:ArrayLike) -> ArrayIdentity activation function.
func
jax._src.nn.functions.leaky_relu(x:ArrayLike, negative_slope:ArrayLike=0.01) -> ArrayLeaky rectified linear unit activation function.
func
jax._src.nn.functions.log1mexp(x:ArrayLike) -> ArrayNumerically stable calculation of :math:`\log(1 - \exp(-x))`.
func
jax._src.nn.functions.log_sigmoid(x:ArrayLike) -> ArrayLog-sigmoid activation function.
func
jax._src.nn.functions.log_softmax(x:ArrayLike, axis:Axis=-1, where:ArrayLike | None=None) -> ArrayLog-Softmax function.
func
jax._src.nn.functions.logmeanexp(x:ArrayLike, axis:Axis=None, where:ArrayLike | None=None, keepdims:bool=False) -> ArrayLog mean exp.
func
jax._src.nn.functions.mish(x:ArrayLike) -> ArrayMish activation function.
func
jax._src.nn.functions.one_hot(x:Any, num_classes:int, *dtype:Any | None=None, *axis:int | AxisName=-1, *out_sharding:NamedSharding | P | None=None) -> ArrayOne-hot encodes the given indices.
func
jax._src.nn.functions.relu(x:ArrayLike) -> ArrayRectified linear unit activation function.
About this data
These signatures were extracted from the public source of jax-ml/jax
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.