Sig coef functions#
sig_coef_cuda#
-
int sig_coef_cuda_f(const float *path, float *out, const uint64_t *multi_idx, uint64_t num_multi_idx, const uint64_t *degrees, uint64_t batch_size, uint64_t dimension, uint64_t length, bool prefixes) noexcept#
Computes signature coefficients for a batch of paths on the GPU.
- Parameters:
path – Pointer to input batch path data (row-major, on device), size =
batch_size * length * dimension.out – Pointer to output buffer (on device, preallocated).
multi_idx – Pointer to flattened multi-indices (on device).
num_multi_idx – Number of multi-indices (words).
degrees – Pointer to degree of each multi-index (on device), size =
num_multi_idx.batch_size – Batch size.
dimension – Dimension of the paths.
length – Length of the paths.
prefixes – If true, output all prefix coefficients; if false, output only the final coefficient.
- Returns:
Status code (0 = success).
-
int sig_coef_cuda_d(const double *path, double *out, const uint64_t *multi_idx, uint64_t num_multi_idx, const uint64_t *degrees, uint64_t batch_size, uint64_t dimension, uint64_t length, bool prefixes) noexcept#
sig_coef_backprop_cuda#
-
int sig_coef_backprop_cuda_f(const float *path, float *out, const float *coefs, const float *derivs, const uint64_t *multi_idx, uint64_t num_multi_idx, const uint64_t *degrees, uint64_t batch_size, uint64_t dimension, uint64_t length) noexcept#
Backpropagates through sig_coef_cuda on the GPU.
- Parameters:
path – Pointer to input batch path data (row-major, on device), size =
batch_size * length * dimension.out – Pointer to output buffer (on device, preallocated), size =
batch_size * length * dimension.coefs – Pointer to prefix coefficients from forward pass (on device).
derivs – Pointer to dF/d(coefs) (on device), same size as coefs.
multi_idx – Pointer to flattened multi-indices (on device).
num_multi_idx – Number of multi-indices (words).
degrees – Pointer to degree of each multi-index (on device), size =
num_multi_idx.batch_size – Batch size.
dimension – Dimension of the paths.
length – Length of the paths.
- Returns:
Status code (0 = success).
-
int sig_coef_backprop_cuda_d(const double *path, double *out, const double *coefs, const double *derivs, const uint64_t *multi_idx, uint64_t num_multi_idx, const uint64_t *degrees, uint64_t batch_size, uint64_t dimension, uint64_t length) noexcept#
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}