| as_gpu_matrix | R Documentation |
Tags a matrix as GPU-backed. In an expression like
as_gpu_matrix(A) %*% B, the multiply dispatches to
ggml_matmul (Vulkan GPU with CPU fallback) instead of R's
built-in. Only one operand needs wrapping. crossprod() and
tcrossprod() on a wrapped matrix likewise use the GPU.
as_gpu_matrix(x, device = "auto", prec = "f32")
x |
A numeric matrix (or something coercible with |
device |
|
prec |
|
A ggml_matrix.
A <- matrix(rnorm(9), 3)
B <- matrix(rnorm(9), 3)
as_gpu_matrix(A, device = "cpu") %*% B
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.