Rewrite test xrt/02 python to generate air dialect directly instead of using linalg + tiling
Add simple compile and load utility for xrt in the style of the python air cpu and air runtime backends, where compile wraps aiecc, and load wraps xrt and copies buffers:
import air.backend.xrt as xrt_backend
backend = xrt_backend.XRTBackend()
with filelock.FileLock("/tmp/npu.lock"):
mul = backend.compile_and_load(mlir_module)
# run the kernel and sync the buffers in both directions
(_, _, output_c) = mul(input_a, input_b, input_c)
Rewrite test xrt/02 python to generate air dialect directly instead of using linalg + tiling
Add simple compile and load utility for xrt in the style of the python air cpu and air runtime backends, where
compile
wraps aiecc, andload
wraps xrt and copies buffers: