Skip to content

XLA ​

Reactant.XLA.AllocatorStats Type

AllocatorStats()

Contains the following fields:

  • num_allocs

  • bytes_in_use

  • peak_bytes_in_use

  • largest_alloc_size

  • bytes_limit

  • bytes_reserved

  • peak_bytes_reserved

  • bytes_reservable_limit

  • largest_free_block_bytes

  • pool_bytes

  • peak_pool_bytes

It should be constructed using the allocatorstats function.

source
Reactant.XLA.SetLogLevel Method
julia
SetLogLevel(level::Integer)

Set the least severe XLA (and other C++ runtime) log messages printed to stderr: 0 for INFO, 1 for WARNING (the default), 2 for ERROR and 3 for FATAL. It can be called at any time after loading Reactant. The initial level can also be chosen by setting the TF_CPP_MIN_LOG_LEVEL environment variable before loading Reactant.

source
Reactant.XLA.allocatorstats Function

allocatorstats([device])

Return an AllocatorStats instance with information about the device specific allocator.

Warning

This method is currently not implemented for the CPU device.

source
Reactant.XLA.claim_gpu_device_mapping! Method
julia
claim_gpu_device_mapping!(owner)

Reserve GPU device mapping configuration for owner. Distributed XLA and MPI/NCCL use incompatible process-to-device setup, so only one of them may configure it.

source
Reactant.XLA.cost_analysis Function
julia
cost_analysis(::AbstractLoadedExecutable)
cost_analysis(::Reactant.Thunk)

Returns a HloCostAnalysisProperties object with the cost analysis of the loaded executable.

source
Reactant.XLA.device_ordinal Function
julia
device_ordinal(device::Device)

Given the device, return the corresponding global device ordinal in the client.

source
Reactant.XLA.device_properties Method
julia
device_properties(device::AbstractDevice)

Get a struct containing device properties. Which exact fields are populated relies on the underlying device implementation.

source
Reactant.XLA.has_initialized_client Method
julia
has_initialized_client(backend)

Return whether a client for backend already exists without triggering lazy backend initialization.

source
Reactant.XLA.isequal_ignoring_metadata Method
julia
isequal_ignoring_metadata(hsharding1::HloSharding, hsharding2::HloSharding)

Same as hsharding1 == hsharding2, but only compares how the data is laid out across the devices. In particular the metadata is ignored, which XLA takes into account through the reduction op (sdy::reduction_op).

source
Reactant.XLA.rocm_gcn_arch_name Method
julia
rocm_gcn_arch_name(device::AbstractDevice)

The target ID of a ROCm device, e.g. "gfx942:sramecc+:xnack-", as rocdl-attach-target takes it.

source
Reactant.XLA.validate_backend_name Method
julia
validate_backend_name(backend::String)

Throw an ArgumentError naming the requested backend and listing the backends that are valid in this session if backend is neither "gpu" nor a registered backend. Backend names are case-sensitive (e.g. "cpu", not "CPU").

source