Skip to main content

Module spirv_nn

Module spirv_nn 

Source
Expand description

SPIR-V compute kernel generators for neural-network operations.

This module extends the Level Zero SPIR-V generator with Conv2D and scaled dot-product attention kernels. Both use the OpenCL execution model (Kernel + Physical64 + Addresses) so they can be consumed by zeModuleCreate.

Functions§

attention_spirv
Generate an OpenCL SPIR-V compute kernel for scaled dot-product attention.
conv2d_spirv
Generate an OpenCL SPIR-V compute kernel for 2-D convolution (NCHW layout).