thunder.clang

Thunder Core Language

maybe_convert_to_dtype(a, dtype, *[, ...])

If a has the same dtype as the given dtype, returns a unmodified.

device_put(a, device)

arange(*, start, step, stop, device[, dtype])

convolution(a, weight, bias, stride, ...)

rtype:

TensorProxy

full(shape, fill_value, *, device[, dtype])

rtype:

TensorProxy

full_like(a, fill_value, *[, device, dtype])

rtype:

TensorProxy

uniform(shape[, minval, maxval])

rtype:

TensorProxy

uniform_like(a[, minval, maxval, device, dtype])

diagonal(a[, offset, dim1, dim2])

rtype:

TensorProxy

expand(a, *shape)

rtype:

TensorProxy

flatten(a[, start_dim, end_dim])

rtype:

TensorProxy

movedim(a, /, source, destination)

rtype:

TensorProxy

reshape(a, shape)

rtype:

TensorProxy

slice_in_dim(a, start_index, limit_index[, ...])

squeeze(a, dims)

transpose(a, permutation)

stride_order(a[, order])

Creates a dense, non-overlapping and strided tensor with the same data and metadata as a.

take(a, indices, dim)

rtype:

TensorProxy

index_add(a, indices, value, dim)

rtype:

TensorProxy

take_along_axis(a, /, indices, dim)

rtype:

TensorProxy

scatter_add(a, /, indices, value, dim)

rtype:

TensorProxy

unsqueeze(a, /, dims)

rtype:

TensorProxy

cat(tensors, dim)

Concatenates the given sequence of tensors in the given dimension.

stack(tensors, dim)

Concatenates the given sequence of tensors in a new (the given) dimension.

compute_broadcast_shape(*_shapes)

Computes the common shape with the fewest dimensions that all input shapes can be broadcast to.

matrix_transpose(a)

Transposes the last two dimensions of a tensor.

maybe_broadcast(*args)

Returns tensors with the same shape, possibly broadcasting inputs to the result shape.

Unary

abs(a)

acos(a)

acosh(a)

asin(a)

asinh(a)

atan(a)

atanh(a)

bitwise_not(a)

rtype:

TensorProxy | Number

ceil(a)

rtype:

TensorProxy | Number

cos(a)

cosh(a)

erf(a)

erfc(a)

erfcinv(a)

erfinv(a)

exp(a)

exp2(a)

expm1(a)

floor(a)

rtype:

TensorProxy | Number

isfinite(a)

lgamma(a)

log(a)

log10(a)

log1p(a)

log2(a)

ndtri(a)

neg(a)

reciprocal(a)

round(a)

rtype:

TensorProxy | Number

rsqrt(a)

sigmoid(a)

sign(a)

signbit(a)

silu(a)

sin(a)

sinh(a)

sqrt(a)

tan(a)

tanh(a)

trunc(a)

rtype:

TensorProxy | Number

Binary

add(a, b)

atan2(a, b)

bitwise_and(a, b)

bitwise_or(a, b)

bitwise_xor(a, b)

copysign(a, b)

eq(a, b)

floor_divide(a, b)

rtype:

TensorProxy | Number

fmod(a, b)

mod(a, b)

ge(a, b)

gt(a, b)

logical_and(a, b)

le(a, b)

lt(a, b)

mul(a, b)

ne(a, b)

nextafter(a, b)

pow(a, b)

remainder(a, b)

sub(a, b)

true_divide(a, b)

Conditional

where(pred, a, b)