0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
zml/platforms/oneapi
Damien Mehala 47e692c300
platforms/oneapi: bump to IGC 2.41.15 (#996)
Bump to resolve a compiler bug encountered on LFM3.

LFM3 broadcasts one sigmoid gate per attention head. This generated code
of sigmoid introduced a BF16 conversion and conditional select. The
compiler then lower it to a scalar computation which had a
register-aligment bug. The fix introduced in 2.41.11
<5d92530a07>
enforces alignment.
History 2026-10-29 11:15:39 +01:00
..
BUILD.bazel platforms/oneapi: add missing header in oneapi target 2026-09-16 21:53:11 +02:00
libzml_oneapi.BUILD.bazel platforms/oneapi: update pjrt plugin (#877) 2026-09-30 19:24:34 +02:00
oneapi.bzl platforms/oneapi: bump to IGC 2.41.15 (#996) 2026-10-29 11:15:39 +01:00
oneapi.h bazel: add zig_options rule (#820) 2026-09-16 21:50:22 +02:00
oneapi.zig bazel: rework zig_options to be config_settting compatible 2026-09-24 22:21:44 +02:00
packages.lock.json platforms/oneapi: bump to IGC 2.41.15 (#996) 2026-10-29 11:15:39 +01:00
packages.yaml platforms/oneapi: bump to IGC 2.41.15 (#996) 2026-10-29 11:15:39 +01:00
README.md zml/platforms: add experimental oneapi (intel) (#550) 2026-05-25 15:52:10 +02:00
zmlxoneapi.zig platforms/intel: full hermetic sandboxing (#638) 2026-07-08 12:02:28 +02:00

EXPERIMENTAL: oneAPI

About

This directory contains the oneAPI backend for ZML. It is currently in an early stage of development, and only supports a subset of ZML's features. The oneAPI backend is only available on Linux, and requires an Intel GPU.

The sharding is not yet supported, so only models that fit in the GPU memory can be run.

Getting Started

Prerequisites

Linux Only

One GPU is supported on Linux. ONEAPI_DEVICE_SELECTOR environment variable must be set to select the GPU device.

For example, to select the first GPU:

export ONEAPI_DEVICE_SELECTOR=level_zero:0

Run

To run the LLM example with oneAPI and the Llama 3.2 1B model:

ONEAPI_DEVICE_SELECTOR=level_zero:0 \
bazel run //examples/llm \
    --config=release \
    --@zml//platforms:cpu=false \
    --@zml//platforms:oneapi=true \
    -- \
    --model=hf://meta-llama/Llama-3.2-1B-Instruct \
    --topk=1 \
    --prompt="Tell me a story about a cat in 2 lines"

To run the LLM example with oneAPI and a local model:

ONEAPI_DEVICE_SELECTOR=level_zero:0 \
bazel run //examples/llm \
    --config=release \
    --@zml//platforms:cpu=false \
    --@zml//platforms:oneapi=true \
    -- \
    --model=path/to/your/model/Llama-3.1-8B-Instruct \
    --topk=1 \
    --prompt="Tell me a story about a cat in 2 lines"