Learn R Programming

ggmlR (version 0.6.1)

ggml_vulkan_device_memory: Get Vulkan device memory

Description

Returns free and total memory for the specified Vulkan device.

Usage

ggml_vulkan_device_memory(device = 0L)

Value

Named list with 'free' and 'total' memory in bytes

Arguments

device

Device index (0-based)

Examples

Run this code
# \donttest{
if (ggml_vulkan_available() && ggml_vulkan_device_count() > 0) {
  mem <- ggml_vulkan_device_memory(0)
  cat("Free:", mem$free / 1e9, "GB\n")
  cat("Total:", mem$total / 1e9, "GB\n")
}
# }

Run the code above in your browser using DataLab