---
title: "mul"
sidebar_label: "mul"
description: "Kotlin binding reference: mul."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[mul](mul.md)

# mul

[common]\
fun [mul](mul.md)(input: [Tensor](../Tensor/index.md), other: [Tensor](../Tensor/index.md), activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`mul(input: Tensor, other: Tensor, activation: Activation = Activation.IDENTITY)`: the `mul` operator. Multiplies `input` by `other` elementwise. Broadcasts and promotes as `add`; `activation` is the same fused float-only epilogue (default `Activation::Identity`).

[common]\
fun [mul](mul.md)(input: [Tensor](../Tensor/index.md), other: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`mul(input: Tensor, other: Double, activation: Activation = Activation.IDENTITY)`: the number form of `mul`, `other` as a scalar.

[common]\
fun [mul](mul.md)(input: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), other: [Tensor](../Tensor/index.md), activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`mul(input: Double, other: Tensor, activation: Activation = Activation.IDENTITY)`: the `mul` operator. Scalar-LHS . `input` keeps its kind (see `Scalar`). `activation` applies to the result, mirroring the tensor-first form (mul carries no alpha; it would fold into the scalar).