vx-lang / vx-lang/Vx

Implement NPU Hardware Dispatch Lowering for `vx.spawn`

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

codegen enhancement runtime
Dominant language
Rust
Stars
14
Forks
2
Avg merge
13h 13m
Merged PRs (30d)
70

Description

Currently, vx.spawn for topology 100 (NPUHBM) is implemented as a placeholder in VxLowering.cpp which sequentially inlines the block without any threading or dispatch.

Tasks:

  1. Update SpawnOpLowering in VxLowering.cpp for topology 100.
  2. Convert the spawn region into an outlined MLIR func.func.
  3. Emit an MLIR llvm.call or func.call targeting the npu_dispatch AMX Objective-C++ runtime function.
  4. Pass any captured variables as arguments to the outlined NPU kernel function.
  5. Provide tests ensuring NPU dispatch works correctly on Apple Silicon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in VxLowering.cpp at SpawnOpLowering and inspect the topology 100 placeholder path. Trace how the spawn region is lowered, then define tests for outlined NPU dispatch on Apple Silicon. Done means captured variables reach the outlined function and the AMX npu_dispatch runtime is invoked instead of sequential inlining.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, objective-c
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.