hidet.ops
hidet.ops¶
Todo
We are still working on the documentation of operators.
Functions:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Check if all of the elements on the given axis evaluates to True. |
|
Check if any of the elements on the given axis evaluates to True. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Barrier operator is an identity operator and return the same tensor as input. |
|
Batched matrix multiplication. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Group norm. |
|
|
|
|
|
|
|
|
|
Instance norm. |
|
|
|
|
|
|
|
Layer norm. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rearrange a tensor. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tile a tensor. |
|
|
|
|
|
|
|
|
|
- hidet.ops.abs(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.acos(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.acosh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.adaptive_avg_pool1d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.adaptive_avg_pool2d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.adaptive_avg_pool3d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.adaptive_max_pool1d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.adaptive_max_pool2d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.adaptive_max_pool3d(x, output_size)¶
- Parameters
x (hidet.Tensor) –
output_size (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.add(x, y)¶
- Parameters
x (Union[hidet.Tensor, float, int]) –
y (Union[hidet.Tensor, float, int]) –
- Return type
- hidet.ops.all(x, /, *, axis=None, keepdims=False)¶
Check if all of the elements on the given axis evaluates to True.
- Parameters
x (Tensor) – The input tensor.
axis (int or Sequence[int], optional) – The axis or axes along which to perform the logical AND. None indicates to perform the reduction on the whole tensor. When an integer or a sequence of integers are given, they must be in range [-N, N), where N is the rank of the input tensor.
keepdims (bool, default=False) – Whehter to keep the dimension.
- Returns
ret – The result of logical AND reduction with bool data type.
- Return type
- hidet.ops.any(x, /, *, axis=None, keepdims=False)¶
Check if any of the elements on the given axis evaluates to True.
- Parameters
x (Tensor) – The input tensor.
axis (int or Sequence[int], optional) – The axis or axes along which to perform the logical OR. None indicates to perform the reduction on the whole tensor. When an integer or a sequence of integers are given, they must be in range [-N, N), where N is the rank of the input tensor.
keepdims (bool, default=False) – Whehter to keep the dimension.
- Returns
ret – The result of logical OR reduction with bool data type.
- Return type
- hidet.ops.arange(start, /, stop=None, step=1, *, dtype=None, device='cpu')¶
- Return type
- hidet.ops.argmax(x, dim, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dim (int) –
keep_dim (bool) –
- Return type
- hidet.ops.argmin(x, dim, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dim (int) –
keep_dim (bool) –
- Return type
- hidet.ops.asin(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.asinh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.atan(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.atan2(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.atanh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.avg_pool2d(x, kernel, stride, padding)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.avg_pool3d(x, kernel, stride, padding)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.barrier(x)¶
Barrier operator is an identity operator and return the same tensor as input. During graph-level optimizations, this operator prevents the fusion of producer and consumer of the input tensor and output tensor, respectively. This operator will be eliminated at the end of graph-level optimizations.
- hidet.ops.batch_matmul(a, b, mma='simt')¶
Batched matrix multiplication.
- Parameters
a (Tensor) – The lhs operand with shape [batch_size, m_size, k_size].
b (Tensor) – The rhs operand with shape [batch_size, k_size, n_size].
mma (str) –
The matrix-multiplication-accumulate (mma) in warp level:
- ’simt’:
Use cuda core to do the warp-level mma (simt stands for single-instruction-multiple-threads).
- ’wmma’:
Use wmma instruction.
- ’mma’:
Use mma instruction.
See also: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions
- Returns
c – The result tensor of matrix multiplication.
- Return type
- hidet.ops.batch_norm_infer(x, running_mean, running_var, epsilon=1e-05, axis=1)¶
- Parameters
x (hidet.Tensor) –
running_mean (hidet.Tensor) –
running_var (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_and(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_invert(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_left_shift(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_or(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_right_shift(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.bitwise_xor(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.broadcast(data, shape)¶
- Parameters
data (hidet.Tensor) –
- Return type
- hidet.ops.cast(x, dtype)¶
- Parameters
x (hidet.Tensor) –
dtype (Union[str, hidet.ir.type.DataType]) –
- Return type
- hidet.ops.ceil(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.celu(x, alpha)¶
- Parameters
x (hidet.Tensor) –
alpha (float) –
- Return type
- hidet.ops.clip(x, min_val, max_val)¶
- Parameters
x (hidet.Tensor) –
min_val (Optional[float]) –
max_val (Optional[float]) –
- Return type
- hidet.ops.concat(tensors, axis)¶
- Parameters
tensors (List[hidet.Tensor]) –
axis (int) –
- Return type
- hidet.ops.conv2d(data, weight, stride, dilations=(1, 1), groups=1)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
stride (Union[int, Sequence[int]]) –
dilations (Union[int, Sequence[int]]) –
groups (int) –
- Return type
- hidet.ops.conv2d_gemm(data, weight, stride, dilations, groups=1)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
dilations (List[int]) –
groups (int) –
- Return type
- hidet.ops.conv2d_gemm_image_transform(x, kernel, stride, dilations, groups=1)¶
- Parameters
x (hidet.Tensor) –
kernel (List[int]) –
stride (List[int]) –
dilations (List[int]) –
groups (int) –
- Return type
- hidet.ops.conv2d_transpose(data, weight, stride, padding, groups=1, output_padding=0)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
stride (Union[int, Sequence[int]]) –
padding (Union[int, Sequence[int]]) –
groups (int) –
output_padding (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.conv2d_transpose_gemm(data, weight, stride, padding, groups=1, output_padding=0)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
stride (Union[int, Sequence[int]]) –
padding (Union[int, Sequence[int]]) –
groups (int) –
output_padding (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.conv2d_winograd(x, w)¶
- Parameters
x (hidet.Tensor) –
w (hidet.Tensor) –
- Return type
- hidet.ops.conv3d(data, weight, stride, dilations, groups=1)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
stride (Union[int, Sequence[int]]) –
dilations (Union[int, Sequence[int]]) –
groups (int) –
- Return type
- hidet.ops.conv3d_gemm(data, weight, stride, dilations, groups=1)¶
- Parameters
data (hidet.Tensor) –
weight (hidet.Tensor) –
dilations (List[int]) –
groups (int) –
- Return type
- hidet.ops.conv_pad(data, pads)¶
- Parameters
data (hidet.Tensor) –
pads (Union[int, List[int]]) –
- Return type
- hidet.ops.cos(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.cosh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.cumsum(x, dim, exclusive=False, reverse=False)¶
- Parameters
x (hidet.Tensor) –
dim (int) –
exclusive (bool) –
reverse (bool) –
- Return type
- hidet.ops.divide(x, y)¶
- Parameters
x (Union[hidet.Tensor, float, int]) –
y (Union[hidet.Tensor, float, int]) –
- Return type
- hidet.ops.equal(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.erf(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.exp(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.expand_dims(x, /, *, axis=0)¶
- Parameters
x (hidet.Tensor) –
axis (int) –
- Return type
- hidet.ops.expm1(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.flatten(x, start_dim=0, end_dim=- 1)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.floor(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.full(shape, value, dtype=None, device='cpu')¶
- Parameters
shape (Sequence[int]) –
value (Union[float, int, bool, hidet.ir.expr.Constant]) –
dtype (Optional[Union[str, hidet.ir.type.DataType]]) –
device (Union[hidet.runtime.device.Device, str]) –
- Return type
- hidet.ops.fused_operator(*inputs, fused_graph, anchor=None)¶
- Parameters
inputs (hidet.Tensor) –
fused_graph (hidet.graph.ir.flow_graph.FlowGraph) –
anchor (Optional[int]) –
- Return type
Union[hidet.Tensor, List[hidet.Tensor]]
- hidet.ops.gather(data, indices, axis=0)¶
- Parameters
data (hidet.Tensor) –
indices (hidet.Tensor) –
axis (int) –
- Return type
- hidet.ops.gelu(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.greater(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.greater_equal(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.group_norm(x, num_groups, epsilon=1e-05)¶
Group norm.
- hidet.ops.hardshrink(x, lambda_val)¶
- Parameters
x (hidet.Tensor) –
lambda_val (float) –
- Return type
- hidet.ops.hardsigmoid(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.hardswish(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.hardtanh(x, min_val, max_val)¶
- Parameters
x (hidet.Tensor) –
min_val (float) –
max_val (float) –
- Return type
- hidet.ops.instance_norm(x, axis=1, epsilon=1e-05)¶
Instance norm.
- hidet.ops.isfinite(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.isinf(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.isnan(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.layer_norm(x, num_last_dims=1, epsilon=1e-05)¶
Layer norm.
- hidet.ops.leaky_relu(x, alpha)¶
- Parameters
x (hidet.Tensor) –
alpha (float) –
- Return type
- hidet.ops.less(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.less_equal(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.linspace(start, stop, /, num, *, dtype=None, device='cpu', endpoint=True)¶
- Return type
- hidet.ops.log(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.log10(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.log1p(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.log2(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.logaddexp(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.logical_and(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.logical_not(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.logical_or(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.logical_xor(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.logsigmoid(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.matmul(a, b)¶
- Parameters
a (hidet.Tensor) –
b (hidet.Tensor) –
- Return type
- hidet.ops.max(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.max_pool2d(x, kernel, stride, padding)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.max_pool3d(x, kernel, stride, padding)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.maximum(a, b, *others)¶
- Parameters
a (hidet.Tensor) –
b (hidet.Tensor) –
others (hidet.Tensor) –
- Return type
- hidet.ops.mean(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.min(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.minimum(a, b, *others)¶
- Parameters
a (hidet.Tensor) –
b (hidet.Tensor) –
others (hidet.Tensor) –
- Return type
- hidet.ops.mod(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.multiply(x, y)¶
- Parameters
x (Union[hidet.Tensor, float, int]) –
y (Union[hidet.Tensor, float, int]) –
- Return type
- hidet.ops.negative(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.not_equal(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.pad(data, pads, mode='constant', value=0.0)¶
- Parameters
data (hidet.Tensor) –
pads (List[int]) –
mode (str) –
value (float) –
- Return type
- hidet.ops.permute_dims(x, /, axes)¶
- Parameters
x (hidet.Tensor) –
axes (Sequence[int]) –
- Return type
- hidet.ops.positive(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.pow(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.prelu(x, slope)¶
- Parameters
x (hidet.Tensor) –
slope (hidet.Tensor) –
- Return type
- hidet.ops.prod(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.rearrange(x, plan)¶
Rearrange a tensor. This task is a general task of squeeze, unsqueeze, flatten, and perm.
- Parameters
x (Tensor) – The input tensor.
plan (List[List[int]]) – The rearrange plan.
- Returns
ret – The task to conduct rearrangement.
- Return type
Examples
squeeze([1, 1, 2, 3], dims=[0, 1]) = rearrange([1, 1, 2, 3], plan=[[2], [3]]) => Tensor([2, 3])
unsqueeze([2, 3], dims=[0, 1]) = rearrange([2, 3], plan=[[], [], [0], [1]]) => Tensor([1, 1, 2, 3])
flatten([2, 3, 4, 5], start_dim=1, end_dim=2) = rearrange([2, 3, 4, 5], plan=[[0], [1, 2], [3]]) => Tensor([2, 12, 5])
- hidet.ops.reciprocal(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.relu(x)¶
- Return type
- hidet.ops.relu6(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.remainder(x, y)¶
- Parameters
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type
- hidet.ops.reshape(x, shape)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.resize2d(data, size, method, coordinate_transformation_mode, rounding_method, roi, cubic_alpha, cubic_exclude, extrapolation_value)¶
- Parameters
data (hidet.Tensor) –
size (List[int]) –
method (str) –
coordinate_transformation_mode (str) –
rounding_method (str) –
roi (Optional) –
cubic_alpha (Optional) –
cubic_exclude (Optional) –
extrapolation_value (Optional) –
- Return type
- hidet.ops.round(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.rsqrt(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.sigmoid(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.sign(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.silu(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.sin(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.sinh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.softmax(x, axis=1)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.softmin(x, axis)¶
- Parameters
x (hidet.Tensor) –
axis (int) –
- Return type
- hidet.ops.softplus(x, beta, threshold_val)¶
- Parameters
x (hidet.Tensor) –
beta (int) –
threshold_val (int) –
- Return type
- hidet.ops.softshrink(x, lambda_val)¶
- Parameters
x (hidet.Tensor) –
lambda_val (float) –
- Return type
- hidet.ops.softsign(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.split(data, axis, parts)¶
- Parameters
data (hidet.Tensor) –
axis (int) –
parts (List[int]) –
- Return type
List[hidet.Tensor]
- hidet.ops.sqrt(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.square(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.squeeze(x, dims)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.std(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.strided_slice(data, starts, ends, axes=None, strides=None)¶
- Parameters
data (hidet.Tensor) –
starts (Sequence[Optional[int]]) –
ends (Sequence[Optional[int]]) –
axes (Optional[Sequence[int]]) –
strides (Optional[Sequence[Optional[int]]]) –
- Return type
- hidet.ops.subtract(x, y)¶
- Parameters
x (Union[hidet.Tensor, float, int]) –
y (Union[hidet.Tensor, float, int]) –
- Return type
- hidet.ops.sum(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.take(data, indices, axis=0)¶
- Parameters
data (hidet.Tensor) –
indices (hidet.Tensor) –
axis (int) –
- Return type
- hidet.ops.tan(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.tanh(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.tanhshrink(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.tile(data, repeats)¶
Tile a tensor. See https://numpy.org/doc/stable/reference/generated/numpy.tile.html.
- Parameters
data (Tensor) – The input tensor to be tiled.
repeats (List[int]) – A list of integers to represent the number of repeats for each dimension. Must have len(repeats) == len(data.shape).
- Returns
ret – The tiled tensor, with shape [a * b for a, b in zip(data.shape, repeats)].
- Return type
- hidet.ops.transpose(x, axes=None)¶
- Parameters
x (hidet.Tensor) –
axes (Optional[Sequence[int]]) –
- Return type
- hidet.ops.trunc(x)¶
- Parameters
x (hidet.Tensor) –
- Return type
- hidet.ops.unsqueeze(x, dims)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, Sequence[int]]) –
- Return type
- hidet.ops.var(x, dims, keep_dim=False)¶
- Parameters
x (hidet.Tensor) –
dims (Union[int, List[int]]) –
keep_dim (bool) –
- Return type
- hidet.ops.where(cond, x, y)¶
- Parameters
cond (hidet.Tensor) –
x (hidet.Tensor) –
y (hidet.Tensor) –
- Return type