Skip to content

Fix KV260 PatchCore XModel compilation - #158

Merged
DeepKnowledge1 merged 12 commits into
mainfrom
fix/kv260-patchcore-xmodel
Aug 24, 2026
Merged

Fix KV260 PatchCore XModel compilation#158
DeepKnowledge1 merged 12 commits into
mainfrom
fix/kv260-patchcore-xmodel

Conversation

@DeepKnowledge1

Copy link
Copy Markdown
Owner

🔗 Related Issue

Fixes #

📝 Description

  • Add a KV260/DPU-friendly PatchCore inference graph.
  • Simplify PatchCore operations to avoid compiler segmentation faults and unsupported CPU-heavy graph partitions.
  • Restructure memory-bank similarity and reduction operations for Vitis AI KV260 compilation.
  • Successfully compile the resulting XModel for DPUCZDX8G_ISA1_B4096 with a single DPU subgraph.

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation update
  • 🏗️ Infrastructure / CI/CD update

🧪 Hardware & Matrix Testing

I have successfully built and tested this code using uv on:

  • anomavision[cpu] (Standard/Edge)
  • anomavision[cu121] (CUDA 12.1)
  • anomavision[cu124] (CUDA 12.4)
  • anomavision[cu118] (CUDA 11.8)

Host OS used for testing:

  • Linux / Ubuntu
  • Windows (Native or WSL2)
  • macOS

🧪 KV260 / Vitis AI Validation

  • Vitis AI PyTorch: 3.5.0+60df3f1+torch1.13.1
  • PyTorch: 1.13.1
  • Target: DPUCZDX8G_ISA1_B4096
  • XModel quantization completed successfully.
  • vai_c_xir compilation completed successfully.
  • Result: 1 DPU subgraph, with CPU output conversion subgraphs only.

✅ Developer Checklist

  • My code follows the core style guidelines of this project (Ruff/Black formatting).
  • I have run uv run pytest and all unit tests pass locally.
  • Lockfile Guard: If I added or modified a dependency in pyproject.toml, I have run uv lock --python 3.10 and committed the updated uv.lock file.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the documentation accordingly (if applicable).

📸 Screenshots / Visual Proof (Optional)

KV260 compiler output

[UNILOG][INFO] Graph name: PatchCoreKV260, with op num: 73
[UNILOG][INFO] Begin to compile...
[UNILOG][INFO] Total device subgraph number 4, DPU subgraph number 1
[UNILOG][INFO] Compile done.

The compiled XModel was generated successfully as deploy.xmodel.

@DeepKnowledge1
DeepKnowledge1 merged commit a68c6d7 into main Aug 24, 2026
5 checks passed
@DeepKnowledge1
DeepKnowledge1 deleted the fix/kv260-patchcore-xmodel branch August 25, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant