Skip to main content

SDK for Neuromorphic X2 Hardware Simulation

Project description

XForge SDK 🧠💻

XForge SDK is a specialized Python library for simulating the execution of Deep Learning models (like YOLO) on Neuromorphic X2 hardware. It provides tools for image preprocessing, neural network weight binarization, and hardware performance benchmarking.


🚀 Features

  • YOLO Integration: Extract weights directly from YOLO26n models for hardware analysis.
  • Crossbar Mapping: Automatically format weights into Signed or Unsigned 64x64/64x32 crossbar grids.
  • Hardware Simulation: Benchmarks PE (Processing Element) utilization, operation counts, and L2 buffer writes.
  • Image Processing & Post-processing: Handles standardized RGB channel splitting and hardware-aligned resizing for neuromorphic inputs, alongside hardware-friendly decoding of prediction coordinates and feature maps.

🛠 Installation

Install the latest version:

pip install XForge-SDK==0.1.2

📖 Quick Start

import streamlit as st
import numpy as np
from XForge_SDK import NeuromorphicSimulator, ImageProcessor, YOLOWrapper

# Page Config
st.set_page_config(page_title="XForge SDK Dashboard", layout="wide")

# 1. Initialize SDK Components
# These replace the manual logic previously scattered in app.py and user.py
@st.cache_resource
def init_sdk():
    return {
        "sim": NeuromorphicSimulator(num_pes=64),
        "processor": ImageProcessor(),
        "yolo": YOLOWrapper('yolon26n.pt')
    }

sdk = init_sdk()

st.title("🎯 YOLO26N: Neuromorphic Analysis SDK")
st.markdown("---")

uploaded_file = st.file_uploader("Upload Image", type=["jpg", "png"])

if uploaded_file:
    # 2. Use ImageProcessor for standardized loading
    img_array, channels = sdk["processor"].load_rgb_image(uploaded_file)
    
    col1, col2 = st.columns([2, 1])
    
    with col1:
        st.subheader("Object Detection")
        results = sdk["yolo"].predict(img_array)
        st.image(results[0].plot(), caption="Detection Results")
        

🧪 Development & Testing

Run the test suite after installation:

If using the Streamlit Dashboard:

streamlit run app.py

🤝 Contributing

For internal use by BM Labs. Please ensure all hardware-specific logic is validated against the NeuromorphicX2 core modules before pushing updates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xforgesdk-0.1.2.tar.gz (395.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xforgesdk-0.1.2-py3-none-any.whl (400.6 kB view details)

Uploaded Python 3

File details

Details for the file xforgesdk-0.1.2.tar.gz.

File metadata

  • Download URL: xforgesdk-0.1.2.tar.gz
  • Upload date:
  • Size: 395.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for xforgesdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 099c8fc694b5069285ec2a9d9f38434195b8f64b798798d2ae7ea95af24a1066
MD5 e19e61b63552fca1b29ff128ca1c70a4
BLAKE2b-256 8f3d835cd6d5c8ac19708add6ac091b4e8ab537660708b97b55afcfb26d8a676

See more details on using hashes here.

File details

Details for the file xforgesdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: xforgesdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 400.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for xforgesdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 008e0dcf74af6e4bad2e316b3fefcbe208db4ca41112274b8fffcd30ce27918a
MD5 f3bfe3288deabfe41a70e7a59f5034c6
BLAKE2b-256 3aadd9154cf8d5f628f14e6e565b8bc94ba7ec6dd0f62417fe1a364c00db98c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page