Skip to main content

Crate flodl_sys

Crate flodl_sys 

Source
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§

FLODL_BFLOAT16
FLODL_CPU
FLODL_CUDA
FLODL_FLOAT16
FLODL_FLOAT32
FLODL_FLOAT64
FLODL_INT32
FLODL_INT64

Functions§

flodl_abs
flodl_adam_step
flodl_adam_step_batched
flodl_adaptive_avg_pool2d
flodl_add
flodl_add_
flodl_add_scalar
flodl_add_scalar_
flodl_all_finite
flodl_arange
flodl_argmax
flodl_argmin
flodl_autocast_guard_delete
flodl_autocast_guard_new
flodl_autograd_node_count
flodl_backward
flodl_batch_norm
flodl_bce_with_logits_loss
flodl_cat
flodl_cat2
flodl_cdist
flodl_ceil
flodl_chunk
flodl_clamp
flodl_clip_grad_norm
flodl_conv2d
flodl_conv_transpose2d
flodl_copy_
flodl_copy_data
flodl_cos
flodl_cross_entropy_loss
flodl_cuda_active_bytes
flodl_cuda_alloc_bytes
flodl_cuda_device_count
flodl_cuda_device_name
flodl_cuda_empty_cache
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_synchronize
flodl_cuda_utilization
flodl_detach
flodl_detach_
flodl_device_index
flodl_device_type
flodl_div
flodl_div_scalar
flodl_dropout
flodl_dtype
flodl_eq_tensor
flodl_exp
flodl_expand
flodl_eye
flodl_feature_dropout
flodl_flatten
flodl_floor
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_free_string
flodl_free_tensor
flodl_from_blob
flodl_full
flodl_fused_adam_
flodl_fused_adamw_
flodl_gather
flodl_ge_scalar
flodl_ge_tensor
flodl_gelu
flodl_get_current_device
flodl_grad
flodl_grid_sample
flodl_gru_cell
flodl_gt_scalar
flodl_gt_tensor
flodl_index_add
flodl_index_select
flodl_is_autocast_enabled
flodl_is_channels_last
flodl_is_grad_enabled
flodl_is_leaf
flodl_is_pinned
flodl_kl_div_loss
flodl_l1_loss
flodl_le_scalar
flodl_le_tensor
flodl_linear
flodl_linspace
flodl_log
flodl_log_softmax
flodl_lstm_cell
flodl_lt_scalar
flodl_lt_tensor
flodl_malloc_trim
flodl_manual_seed
flodl_matmul
flodl_max
flodl_max_dim
flodl_max_pool2d
flodl_mean
flodl_mean_dim
flodl_meshgrid
flodl_min
flodl_min_dim
flodl_mse_loss
flodl_mul
flodl_mul_scalar
flodl_mul_scalar_
flodl_narrow
flodl_narrow_scatter
flodl_native_layer_norm
flodl_ndim
flodl_ne_tensor
flodl_neg
flodl_no_grad_guard_delete
flodl_no_grad_guard_new
flodl_norm
flodl_numel
flodl_ones
flodl_ones_like
flodl_pad
flodl_permute
flodl_pin_memory
flodl_pow_scalar
flodl_rand
flodl_randn
flodl_reciprocal
flodl_relu
flodl_repeat
flodl_requires_grad
flodl_reshape
flodl_round
flodl_scatter_add
flodl_select
flodl_select_scatter
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_sort
flodl_sqrt
flodl_squeeze
flodl_stack
flodl_std_dim
flodl_std_op
flodl_sub
flodl_sub_
flodl_sum
flodl_sum_dim
flodl_tanh_op
flodl_to_channels_last
flodl_to_device
flodl_to_device_async
flodl_to_dtype
flodl_topk
flodl_transpose
flodl_triu
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§

FlodlTensor
Opaque handle to a torch::Tensor on the C++ side.