helion.language.load#
- helion.language.load(tensor, index, extra_mask=None, eviction_policy=None)[source]#
Load a value from a tensor using a list of indices.
This function is equivalent to tensor[index] but allows setting extra_mask= to mask elements beyond the default masking based on the hl.tile range. It also accepts an optional eviction_policy which is forwarded to the underlying Triton tl.load call to control the cache eviction behavior (e.g., “evict_last”).
- Parameters:
tensor (
Tensor|StackTensor) – The tensor / stack tensor to load fromindex (
list[object]) – The indices to use to index into the tensorextra_mask (
Tensor|None) – The extra mask (beyond automatic tile bounds masking) to apply to the tensoreviction_policy (
str|None) – Optional Triton load eviction policy to hint cache behavior
- Returns:
The loaded value
- Return type: