triton.language.tensor
- class triton.language.tensor(handle, type: dtype)
Represents an N-dimensional array of values or pointers.
tensoris the fundamental data structure in Triton programs. Most functions intriton.languageoperate on and return tensors.Most of the named member functions here are duplicates of the free functions in
triton.language. For example,triton.language.sqrt(x)is equivalent tox.sqrt().tensoralso defines most of the magic/dunder methods, so you can writex+y,x << 2, etc.Constructors
- __init__(handle, type: dtype)
Not called by user code.
Methods
__init__(handle, type)Not called by user code.
abs([_semantic])Forwards to
abs()free functionadvance(offsets[, _semantic])Forwards to
advance()free functionassociative_scan(axis, combine_fn[, ...])Forwards to
associative_scan()free functionatomic_add(val[, mask, sem, scope, _semantic])Forwards to
atomic_add()free functionatomic_and(val[, mask, sem, scope, _semantic])Forwards to
atomic_and()free functionatomic_cas(cmp, val[, sem, scope, _semantic])Forwards to
atomic_cas()free functionatomic_max(val[, mask, sem, scope, _semantic])Forwards to
atomic_max()free functionatomic_min(val[, mask, sem, scope, _semantic])Forwards to
atomic_min()free functionatomic_or(val[, mask, sem, scope, _semantic])Forwards to
atomic_or()free functionatomic_xchg(val[, mask, sem, scope, _semantic])Forwards to
atomic_xchg()free functionatomic_xor(val[, mask, sem, scope, _semantic])Forwards to
atomic_xor()free functionbroadcast_to(*shape[, _semantic])Forwards to
broadcast_to()free functioncast(dtype[, fp_downcast_rounding, bitcast, ...])Forwards to
cast()free functionceil([_semantic])Forwards to
ceil()free functioncos([_semantic])Forwards to
cos()free functionerf([_semantic])Forwards to
erf()free functionexp([_semantic])Forwards to
exp()free functionexp2([_semantic])Forwards to
exp2()free functionexpand_dims(axis[, _semantic])Forwards to
expand_dims()free functionextract_slice(offsets, sizes, strides[, ...])Forwards to
extract_slice()free functionfloor([_semantic])Forwards to
floor()free functiongather(index, axis[, _semantic])Forwards to
gather()free functiongather_out_to_ub(index, index_boundary, dim, ...)Forwards to
gather_out_to_ub()free functionget_element(indice[, _semantic, _generator])Forwards to
get_element()free functionhistogram(num_bins[, mask, _semantic, ...])Forwards to
histogram()free functionindex_put(index, value, dim, index_boundary, ...)Forwards to
index_put()free functionindex_select_simd(dim, index, src_shape, ...)Forwards to
index_select_simd()free functioninsert_slice(sub, offsets, sizes, strides[, ...])Forwards to
insert_slice()free functionitem([_semantic, _generator])Forwards to
item()free functionlog([_semantic])Forwards to
log()free functionlog2([_semantic])Forwards to
log2()free functionlogical_and(other[, _semantic])logical_or(other[, _semantic])permute(*dims[, _semantic])Forwards to
permute()free functionreduce(axis, combine_fn[, keep_dims, ...])Forwards to
reduce()free functionreshape(*shape[, can_reorder, _semantic, ...])Forwards to
reshape()free functionrsqrt([_semantic])Forwards to
rsqrt()free functionscatter_ub_to_out(value, index, ...[, _semantic])Forwards to
scatter_ub_to_out()free functionsin([_semantic])Forwards to
sin()free functionsort([dim, descending])split([_semantic, _generator])Forwards to
split()free functionsqrt([_semantic])Forwards to
sqrt()free functionsqrt_rn([_semantic])Forwards to
sqrt_rn()free functionstore(value[, mask, boundary_check, ...])Forwards to
store()free functionsync_block_all(event_id[, _semantic])Forwards to
sync_block_all()free functionsync_block_set(receiver, event_id[, _semantic])Forwards to
sync_block_set()free functionsync_block_wait(receiver, event_id[, _semantic])Forwards to
sync_block_wait()free functionto(dtype[, fp_downcast_rounding, bitcast, ...])Alias for
tensor.cast().trans(*dims[, _semantic])Forwards to
trans()free functionview(*shape[, _semantic])Forwards to
view()free functionAttributes
TTransposes a 2D tensor.
argmaxargminatan2cdivcumprodcumsumfinitefflipisfinitedmaxminravelreduce_orsigmoidsoftmaxsumxor_sumtype