ExCubecl.NIF (ExCubecl v0.3.0)

Copy Markdown View Source

NIF stubs for the CubeCL Rust backend.

Each function delegates to the Rust NIF implementation. If the NIF is not loaded, returns {:error, :nif_not_loaded}.

Buffers are managed via Rustler ResourceArc — they are automatically freed when the Elixir term is garbage collected. No manual free is needed.

Summary

Functions

buffer_dtype(buffer)

buffer_new(data, shape, dtype)

buffer_read(buffer)

buffer_shape(buffer)

buffer_size(buffer)

device_count()

device_info()

kernel_list()

kernel_run(name, inputs, output, params)

pipeline_add(pipeline_id, name, inputs, output, params)

pipeline_free(pipeline_id)

pipeline_new()

pipeline_run(pipeline_id)

poll(command_id)

submit(command)

wait(command_id)