This library provides a wrapper for Level Zero API to init GPU and provide functions to allocate shared or device memory.
Use meson to build the project
- Use
print_gpu_drivers_and_devicesto list drivers and devices index. - Create
GpuContextand useinit_gpu_deviceto init gpu context. - Allocate memory with
gpu_allocate_device_bufferorgpu_allocate_shared_buffer. - Use
gpu_memcpyandgpu_memsetfor memcpy and memset operations. - Free memory space with
gpu_free_buffunction. - Free gpu context with
free_gpu_context.
To Build MTL with GPU Direct Library please refer to doc file.
The library contains unit tests. To run the tests use:
./run_tests.sh