NAME
PDL::GGML - GGML tensor computation graph bindings for PDL
SYNOPSIS
use PDL;
use PDL::GGML qw(ggml_add ggml_mul ggml_mul_mat);
my $a = float([[1, 2], [3, 4]]);
my $b = float([[5, 6], [7, 8]]);
my $sum = ggml_add($a, $b);
my $mul = ggml_mul($a, $b);
my $mm = ggml_mul_mat($a, $b);
DESCRIPTION
PDL::GGML binds PDL ndarrays directly to GGML's C tensor computation graph API (ggml.h / ggml-cpu.h) via C99 XS.
FUNCTIONS
ggml_add
Compute elementwise addition of two float PDL ndarrays using GGML.
$c = ggml_add($a, $b);
ggml_mul
Compute elementwise multiplication of two float PDL ndarrays using GGML.
$c = ggml_mul($a, $b);
ggml_mul_mat
Compute GGML matrix multiplication a * b^T on two 2D float PDL ndarrays.
$c = ggml_mul_mat($a, $b);
SEE ALSO
PDL, PDL::Torch, PDL::XGBoost, PDL::ONNX, PDL::FAISS
AUTHOR
C.J. Collier <cjac@google.com>
LICENSE
Licensed under the Apache License, Version 2.0.