Skip to main content

//clika-runtime/io.clika.runtime/Ops/hashTensor

hashTensor

[common]
fun hashTensor(input: Tensor, dims: LongArray = longArrayOf(), keepdim: Boolean = false, mode: HashTensorMode = HashTensorMode.XOR_SUM): Tensor

hashTensor(input: Tensor, dims: LongArray = longArrayOf(), keepdim: Boolean = false, mode: HashTensorMode = HashTensorMode.XOR_SUM): the hash_tensor operator. Bitwise hash-reduction over dims (empty = all): each element's bits are mixed and combined per mode into a UInt64 digest, standard reduction shape. Order-independent under HashTensorMode::XorSum, and identical on every backend, a cheap whole-tensor fingerprint for parity checks and cache keys.