sig_kernel_cuda#

int sig_kernel_cuda(const double *gram, double *out, uint64_t dimension, uint64_t length1, uint64_t length2, uint64_t dyadic_order_1, uint64_t dyadic_order_2, bool return_grid = false) noexcept#

Computes the signature kernel of two paths from their gram matrix.

Parameters:
  • gram – Pointer to gram matrix data (row-major), size = (length1 - 1) * (length2 - 1).

  • out – Pointer to output buffer (row-major, preallocated), size = return_grid ? (((length1 - 1) << dyadic_order_1) + 1) * (((length2 - 1) << dyadic_order_2) + 1) : 1.

  • dimension – Dimension of the path.

  • length1 – Length of the first path.

  • length2 – Length of the second path.

  • dyadic_order_1 – Dyadic refinement for the first path.

  • dyadic_order_2 – Dyadic refinement for the second path.

  • return_grid – Whether to return the entire PDE grid (default = false).

Returns:

Status code (0 = success).

batch_sig_kernel_cuda#

int batch_sig_kernel_cuda(const double *gram, double *out, uint64_t batch_size, uint64_t dimension, uint64_t length1, uint64_t length2, uint64_t dyadic_order_1, uint64_t dyadic_order_2, bool return_grid = false) noexcept#

Computes signature kernels of a batch of paths from their gram matrices.

Parameters:
  • gram – Pointer to batch gram matrix data (row-major), size = batch_size * (length1 - 1) * (length2 - 1).

  • out – Pointer to output buffer (row-major, preallocated), size = batch_size * (return_grid ? (((length1 - 1) << dyadic_order_1) + 1) * (((length2 - 1) << dyadic_order_2) + 1) : 1).

  • batch_size – Batch size of the paths.

  • dimension – Dimension of the path.

  • length1 – Length of the first path.

  • length2 – Length of the second path.

  • dyadic_order_1 – Dyadic refinement for the first path.

  • dyadic_order_2 – Dyadic refinement for the second path.

  • return_grid – Whether to return the entire PDE grid (default = false).

Returns:

Status code (0 = success).

sig_kernel_backprop_cuda#

int sig_kernel_backprop_cuda(const double *gram, double *out, double derivs, const double *k_grid, uint64_t dimension, uint64_t length1, uint64_t length2, uint64_t dyadic_order_1, uint64_t dyadic_order_2) noexcept#

Backpropagation through sig_kernel.

Parameters:
  • gram – Pointer to gram matrix data (row-major), size = (length1 - 1) * (length2 - 1).

  • out – Pointer to output buffer (row-major, preallocated), size = (length1 - 1) * (length2 - 1).

  • derivs – Derivative with respect to the signature kernel.

  • k_grid – Pointer to signature kernel PDE grid (row-major, precomputed), size = (((length1 - 1) << dyadic_order_1) + 1) * (((length2 - 1) << dyadic_order_2) + 1).

  • dimension – Dimension of the path.

  • length1 – Length of the first path.

  • length2 – Length of the second path.

  • dyadic_order_1 – Dyadic refinement for the first path.

  • dyadic_order_2 – Dyadic refinement for the second path.

Returns:

Status code (0 = success).

batch_sig_kernel_backprop_cuda#

int batch_sig_kernel_backprop_cuda(const double *gram, double *out, const double *derivs, const double *k_grid, uint64_t batch_size, uint64_t dimension, uint64_t length1, uint64_t length2, uint64_t dyadic_order_1, uint64_t dyadic_order_2) noexcept#

Backpropagation through batch_sig_kernel.

Parameters:
  • gram – Pointer to batch gram matrix data (row-major), size = batch_size * (length1 - 1) * (length2 - 1).

  • out – Pointer to output buffer (row-major, preallocated), size = batch_size * (length1 - 1) * (length2 - 1).

  • derivs – Pointer to derivatives with respect to the signature kernels, size = batch_size.

  • k_grid – Pointer to batch of signature kernel PDE grids (row-major, precomputed), size = batch_size * (((length1 - 1) << dyadic_order_1) + 1) * (((length2 - 1) << dyadic_order_2) + 1).

  • batch_size – Batch size of the paths.

  • dimension – Dimension of the paths.

  • length1 – Length of the first paths.

  • length2 – Length of the second paths.

  • dyadic_order_1 – Dyadic refinement for the first paths.

  • dyadic_order_2 – Dyadic refinement for the second paths.

Returns:

Status code (0 = success).