Expand description
Raw FFI bindings to the libtorch C++ shim.
Every function that can fail returns a *mut i8 error string (caller
must free it with flodl_free_string). A null pointer means success.
FlodlTensor is an opaque *mut c_void handle to a heap-allocated
torch::Tensor. Caller owns it and must free with flodl_free_tensor.
Constants§
Functions§
- flodl_
abs ⚠ - flodl_
acos ⚠ - flodl_
adam_ ⚠step - flodl_
adam_ ⚠step_ batched - flodl_
adaptive_ ⚠avg_ pool2d - flodl_
adaptive_ ⚠max_ pool2d - flodl_
add ⚠ - flodl_
add_ ⚠ - flodl_
add_ ⚠scalar - flodl_
add_ ⚠scalar_ - flodl_
addcdiv ⚠ - flodl_
addcmul ⚠ - flodl_
addmm ⚠ - flodl_
all ⚠ - flodl_
all_ ⚠finite - flodl_
any ⚠ - flodl_
arange ⚠ - flodl_
argmax ⚠ - flodl_
argmin ⚠ - flodl_
argsort ⚠ - flodl_
asin ⚠ - flodl_
atan ⚠ - flodl_
atan2 ⚠ - flodl_
autocast_ ⚠guard_ delete - flodl_
autocast_ ⚠guard_ new - flodl_
autograd_ ⚠node_ count - flodl_
avg_ ⚠pool1d - flodl_
avg_ ⚠pool2d - flodl_
backward ⚠ - flodl_
batch_ ⚠norm - flodl_
bce_ ⚠loss - flodl_
bce_ ⚠with_ logits_ loss - flodl_
bernoulli ⚠ - flodl_
bilinear ⚠ - flodl_
cat ⚠ - flodl_
cat2 ⚠ - flodl_
cdist ⚠ - flodl_
ceil ⚠ - flodl_
chunk ⚠ - flodl_
clamp ⚠ - flodl_
clamp_ ⚠max - flodl_
clamp_ ⚠min - flodl_
clip_ ⚠grad_ norm - flodl_
col2im ⚠ - flodl_
contiguous ⚠ - flodl_
conv1d ⚠ - flodl_
conv2d ⚠ - flodl_
conv3d ⚠ - flodl_
conv_ ⚠transpose1d - flodl_
conv_ ⚠transpose2d - flodl_
conv_ ⚠transpose3d - flodl_
copy_ ⚠ - flodl_
copy_ ⚠data - flodl_
cos ⚠ - flodl_
cosine_ ⚠similarity - flodl_
count_ ⚠nonzero - flodl_
count_ ⚠nonzero_ dim - flodl_
cross_ ⚠entropy_ loss - flodl_
ctc_ ⚠loss - flodl_
cuda_ ⚠active_ bytes - flodl_
cuda_ ⚠alloc_ bytes - flodl_
cuda_ ⚠compute_ capability - flodl_
cuda_ ⚠device_ count - flodl_
cuda_ ⚠device_ name - flodl_
cuda_ ⚠empty_ cache - flodl_
cuda_ ⚠event_ delete - flodl_
cuda_ ⚠event_ elapsed_ time - flodl_
cuda_ ⚠event_ new - flodl_
cuda_ ⚠event_ query - flodl_
cuda_ ⚠event_ record - flodl_
cuda_ ⚠event_ record_ on_ stream - flodl_
cuda_ ⚠event_ synchronize - flodl_
cuda_ ⚠graph_ capture_ begin - flodl_
cuda_ ⚠graph_ capture_ end - flodl_
cuda_ ⚠graph_ delete - flodl_
cuda_ ⚠graph_ new - flodl_
cuda_ ⚠graph_ pool - flodl_
cuda_ ⚠graph_ pool_ handle - flodl_
cuda_ ⚠graph_ replay - flodl_
cuda_ ⚠graph_ reset - flodl_
cuda_ ⚠is_ available - flodl_
cuda_ ⚠manual_ seed_ all - flodl_
cuda_ ⚠mem_ info - flodl_
cuda_ ⚠peak_ active_ bytes - flodl_
cuda_ ⚠peak_ reserved_ bytes - flodl_
cuda_ ⚠reset_ peak_ stats - flodl_
cuda_ ⚠stream_ delete - flodl_
cuda_ ⚠stream_ get_ current - flodl_
cuda_ ⚠stream_ new - flodl_
cuda_ ⚠stream_ query - flodl_
cuda_ ⚠stream_ restore_ default - flodl_
cuda_ ⚠stream_ set_ current - flodl_
cuda_ ⚠stream_ synchronize - flodl_
cuda_ ⚠stream_ wait_ event - flodl_
cuda_ ⚠synchronize - flodl_
cuda_ ⚠utilization - flodl_
cumprod ⚠ - flodl_
cumsum ⚠ - flodl_
detach ⚠ - flodl_
detach_ ⚠ - flodl_
device_ ⚠index - flodl_
device_ ⚠type - flodl_
diagonal ⚠ - flodl_
div ⚠ - flodl_
div_ ⚠ - flodl_
div_ ⚠scalar - flodl_
div_ ⚠scalar_ - flodl_
dropout ⚠ - flodl_
dtype ⚠ - flodl_
elu ⚠ - flodl_
embedding_ ⚠bag - flodl_
empty ⚠ - flodl_
ensure_ ⚠grad_ accumulator - Force creation of the AccumulateGrad node for a leaf tensor with
requires_grad=true. The node’s stream is pinned to the current CUDA stream at the moment of this call. Use underStreamGuardto ensure DDP workers’ parameters accumulate on the training stream, not the autograd engine’s default stream. - flodl_
eq_ ⚠scalar - flodl_
eq_ ⚠tensor - flodl_
erf ⚠ - flodl_
erfc ⚠ - flodl_
exp ⚠ - flodl_
expand ⚠ - flodl_
expm1 ⚠ - flodl_
eye ⚠ - flodl_
feature_ ⚠dropout - flodl_
fill_ ⚠ - flodl_
flatten ⚠ - flodl_
flip ⚠ - flodl_
floor ⚠ - flodl_
fmod_ ⚠scalar - flodl_
fmod_ ⚠tensor - flodl_
force_ ⚠cuda_ link - flodl_
foreach_ ⚠add_ list_ - flodl_
foreach_ ⚠add_ scalar_ - flodl_
foreach_ ⚠lerp_ scalar_ - flodl_
foreach_ ⚠mul_ scalar_ - flodl_
foreach_ ⚠norm - flodl_
foreach_ ⚠sqrt_ - flodl_
foreach_ ⚠zero_ - flodl_
frac ⚠ - flodl_
free_ ⚠string - flodl_
free_ ⚠tensor - flodl_
from_ ⚠blob - flodl_
full ⚠ - flodl_
full_ ⚠like - flodl_
fused_ ⚠adam_ - flodl_
fused_ ⚠adamw_ - flodl_
gather ⚠ - flodl_
ge_ ⚠scalar - flodl_
ge_ ⚠tensor - flodl_
gelu ⚠ - flodl_
get_ ⚠current_ device - flodl_
grad ⚠ - flodl_
grad_ ⚠accumulator_ delete - Free a handle returned by
flodl_ensure_grad_accumulator. Safe to call with a null pointer. - flodl_
grid_ ⚠sample - flodl_
group_ ⚠norm - flodl_
gru ⚠ - flodl_
gru_ ⚠cached - flodl_
gru_ ⚠cell - flodl_
gt_ ⚠scalar - flodl_
gt_ ⚠tensor - flodl_
hardsigmoid ⚠ - flodl_
hardswish ⚠ - flodl_
im2col ⚠ - flodl_
index_ ⚠add - flodl_
index_ ⚠select - flodl_
instance_ ⚠norm - flodl_
interpolate ⚠ - flodl_
is_ ⚠autocast_ enabled - flodl_
is_ ⚠channels_ last - flodl_
is_ ⚠contiguous - flodl_
is_ ⚠grad_ enabled - flodl_
is_ ⚠leaf - flodl_
is_ ⚠pinned - flodl_
isclose ⚠ - flodl_
isinf ⚠ - flodl_
isnan ⚠ - flodl_
kl_ ⚠div_ loss - flodl_
l1_ ⚠loss - flodl_
le_ ⚠scalar - flodl_
le_ ⚠tensor - flodl_
leaky_ ⚠relu - flodl_
lerp ⚠ - flodl_
lerp_ ⚠tensor - flodl_
linear ⚠ - flodl_
linspace ⚠ - flodl_
log ⚠ - flodl_
log2 ⚠ - flodl_
log1p ⚠ - flodl_
log10 ⚠ - flodl_
log_ ⚠softmax - flodl_
logical_ ⚠and - flodl_
logical_ ⚠not - flodl_
logical_ ⚠or - flodl_
logsumexp ⚠ - flodl_
lstm ⚠ - flodl_
lstm_ ⚠cached - flodl_
lstm_ ⚠cell - flodl_
lt_ ⚠scalar - flodl_
lt_ ⚠tensor - flodl_
malloc_ ⚠trim - flodl_
manual_ ⚠seed - flodl_
masked_ ⚠fill - flodl_
matmul ⚠ - flodl_
max ⚠ - flodl_
max_ ⚠dim - flodl_
max_ ⚠pool1d - flodl_
max_ ⚠pool2d - flodl_
maximum ⚠ - flodl_
mean ⚠ - flodl_
mean_ ⚠dim - flodl_
median ⚠ - flodl_
median_ ⚠dim - flodl_
meshgrid ⚠ - flodl_
min ⚠ - flodl_
min_ ⚠dim - flodl_
minimum ⚠ - flodl_
mish ⚠ - flodl_
movedim ⚠ - flodl_
mse_ ⚠loss - flodl_
mul ⚠ - flodl_
mul_ ⚠ - flodl_
mul_ ⚠scalar - flodl_
mul_ ⚠scalar_ - flodl_
multinomial ⚠ - flodl_
narrow ⚠ - flodl_
narrow_ ⚠scatter - flodl_
native_ ⚠layer_ norm - flodl_
nccl_ ⚠abort_ rank - flodl_
nccl_ ⚠all_ reduce - flodl_
nccl_ ⚠all_ reduce_ rank - flodl_
nccl_ ⚠broadcast - flodl_
nccl_ ⚠destroy - flodl_
nccl_ ⚠destroy_ rank - flodl_
nccl_ ⚠get_ unique_ id - flodl_
nccl_ ⚠init - flodl_
nccl_ ⚠init_ rank - flodl_
nccl_ ⚠size - flodl_
nccl_ ⚠split_ rank - flodl_
ndim ⚠ - flodl_
ne_ ⚠scalar - flodl_
ne_ ⚠tensor - flodl_
neg ⚠ - flodl_
nll_ ⚠loss - flodl_
no_ ⚠grad_ guard_ delete - flodl_
no_ ⚠grad_ guard_ new - flodl_
nonzero ⚠ - flodl_
norm ⚠ - flodl_
norm_ ⚠p_ dim - flodl_
normalize ⚠ - flodl_
numel ⚠ - flodl_
one_ ⚠hot - flodl_
ones ⚠ - flodl_
ones_ ⚠like - flodl_
pad ⚠ - flodl_
pad_ ⚠mode - flodl_
permute ⚠ - flodl_
pin_ ⚠memory - flodl_
pixel_ ⚠shuffle - flodl_
pixel_ ⚠unshuffle - flodl_
pow_ ⚠scalar - flodl_
prelu ⚠ - flodl_
prod ⚠ - flodl_
prod_ ⚠dim - flodl_
rand ⚠ - flodl_
rand_ ⚠like - flodl_
randint ⚠ - flodl_
randn ⚠ - flodl_
randn_ ⚠like - flodl_
randperm ⚠ - flodl_
reciprocal ⚠ - flodl_
relu ⚠ - flodl_
remainder_ ⚠scalar - flodl_
remainder_ ⚠tensor - flodl_
repeat ⚠ - flodl_
requires_ ⚠grad - flodl_
reshape ⚠ - flodl_
rnn_ ⚠params_ create - flodl_
rnn_ ⚠params_ free - flodl_
roll ⚠ - flodl_
round ⚠ - flodl_
scatter ⚠ - flodl_
scatter_ ⚠add - flodl_
searchsorted ⚠ - flodl_
select ⚠ - flodl_
select_ ⚠scatter - flodl_
selu ⚠ - flodl_
set_ ⚠cudnn_ benchmark - flodl_
set_ ⚠current_ device - flodl_
set_ ⚠grad - flodl_
set_ ⚠requires_ grad - flodl_
shallow_ ⚠clone - flodl_
shape ⚠ - flodl_
sigmoid ⚠ - flodl_
sign ⚠ - flodl_
silu ⚠ - flodl_
sin ⚠ - flodl_
smooth_ ⚠l1_ loss - flodl_
softmax ⚠ - flodl_
softplus ⚠ - flodl_
sort ⚠ - flodl_
split ⚠ - flodl_
sqrt ⚠ - flodl_
squeeze ⚠ - flodl_
stack ⚠ - flodl_
std_ ⚠dim - flodl_
std_ ⚠op - flodl_
sub ⚠ - flodl_
sub_ ⚠ - flodl_
sum ⚠ - flodl_
sum_ ⚠dim - flodl_
sum_ ⚠dims - flodl_
tan ⚠ - flodl_
tanh_ ⚠op - flodl_
tile ⚠ - flodl_
to_ ⚠channels_ last - flodl_
to_ ⚠device - flodl_
to_ ⚠device_ async - flodl_
to_ ⚠dtype - flodl_
topk ⚠ - flodl_
transpose ⚠ - flodl_
tril ⚠ - flodl_
triu ⚠ - flodl_
trunc ⚠ - flodl_
unbind ⚠ - flodl_
unique ⚠ - flodl_
unsqueeze ⚠ - flodl_
var ⚠ - flodl_
var_ ⚠dim - flodl_
where ⚠ - flodl_
zero_ ⚠ - flodl_
zero_ ⚠grad - flodl_
zero_ ⚠grad_ set_ to_ none - flodl_
zeros ⚠ - flodl_
zeros_ ⚠like
Type Aliases§
- Flodl
Tensor - Opaque handle to a
torch::Tensoron the C++ side.