Qu

gpu_probe_info

Builtin index · REPL & diagnostics

result = gpu_probe_info()

Input: no input · Output: result

What it is

Takes no arguments.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = gpu_probe_info()no input
result boolean, number, or matrix
Returns a struct-like value with three fields: .available (a boolean, whether a GPU backend was found), .crossover (a number, the measured matrix/problem size above which the GPU wins over the CPU — inf on a build without GPU support), and .samples (a list of the timed sample points used to compute the crossover). Reports what the GPU probe found at startup.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

A = randn(200, 200)
B = randn(200, 200)
C = A * B
d = device_used()
print("device = {d.device}, gpu_dispatches = {d.gpu_dispatches}")
p = gpu_probe_info()
print("gpu available = {p.available}, crossover = {p.crossover}")

from repl-diagnostics