Skip to main content

ClikaRT::ops::qk_layer_norm_

function

qk_layer_norm_()​

Tensor& qk_layer_norm_(
    Tensor& query,
    Tensor* key = nullptr,
    Tensor* value = nullptr,
    OptionalTensor query_weight = {},
    OptionalTensor query_bias = {},
    OptionalTensor key_weight = {},
    OptionalTensor key_bias = {},
    std::int64_t head_dim = 0,
    std::optional<double> eps = std::nullopt
)

In-place qk_layer_norm: normalizes query (and key and value, when given) through their own storage (no output allocation). key and value are optional operands written through: pass a pointer to your tensor, or nullptr for absent. Every written-through handle is rebound to the op's output, so under a TracingScope the caller's key becomes the traced output exactly as query does. Otherwise the same arguments and error conditions as qk_layer_norm(). Returns query under the value surface, Result<void> under the Result surface; CLIKART_CHECK is the mode-stable spelling.

Declared in ClikaRT/compute/ops.h, line 3669