GPU Direct Library#
General Info#
This library provides a wrapper for Level Zero API to init GPU and provide functions to allocate shared or device memory.
Build#
Use meson
to build the project
How to use it#
Use
print_gpu_drivers_and_devices
to list drivers and devices index.Create
GpuContext
and useinit_gpu_device
to init gpu context.Allocate memory with
gpu_allocate_device_buffer
orgpu_allocate_shared_buffer
.Use
gpu_memcpy
andgpu_memset
for memcpy and memset operations.Free memory space with
gpu_free_buf
function.Free gpu context with
free_gpu_context
.
Build MTL GPU-Direct Library#
To Build MTL with GPU Direct Library please refer to doc file.
Unit tests#
The library contains unit tests. To run the tests use:
./run_tests.sh