Skip to content

v0.1 Roaddmap #32

@peterlau123

Description

@peterlau123

NovaLLM System Architecture (系统架构图)

Complete System Overview

graph TB
    %% External Users and Applications
    subgraph "👥 External Users<br/>外部用户"
        USER[End Users<br/>终端用户]
        DEV[Developers<br/>开发者]
        SYS[Systems<br/>系统集成]
    end

    %% Applications and APIs
    subgraph "📱 Application Layer<br/>应用层"
        APP[User Applications<br/>用户应用<br/>Chatbots, Tools, APIs]
        HTTP_API[HTTP API<br/>REST/gRPC]
        SDK[SDK & Libraries<br/>开发工具包]
    end

    %% Core NovaLLM System
    subgraph "🧠 NovaLLM Core<br/>NovaLLM核心"
        ENGINE[LLM Engine<br/>LLM引擎<br/>Inference Pipeline]

        subgraph "⚙️ Engine Components<br/>引擎组件"
            TOKENIZER[Tokenizer<br/>分词器]
            MODEL_EXEC[Model Executor<br/>模型执行器]
            KV_CACHE[KV Cache<br/>键值缓存]
            SAMPLER[Sampler<br/>采样器]
        end

        subgraph "🏗️ Core Abstractions<br/>核心抽象"
            TENSOR_SYSTEM[Tensor System<br/>张量系统]
            BUFFER_MGR[Buffer Manager<br/>缓冲区管理器]
            DEVICE_ABS[Device Abstraction<br/>设备抽象]
        end
    end

    %% Memory Management System
    subgraph "💾 Advanced Memory Pool (AMP)<br/>高级内存池"
        AMP_CORE[AMP Core<br/>AMP核心]

        subgraph "🏛️ Memory Infrastructure<br/>内存基础设施"
            ARENA_ROUTER[Arena Router<br/>竞技场路由器<br/>CPU/GPU/NPU]
            THREAD_CACHE[Thread Cache<br/>线程缓存<br/>Per-thread Pools]
            CENTRAL_CACHE[Central Cache<br/>中央缓存<br/>Shared Free Lists]
            PAGE_HEAP[Page Heap<br/>页面堆<br/>Large Allocations]
        end

        subgraph "🔧 Memory Allocators<br/>内存分配器"
            CPU_ALLOC[CPU Allocators<br/>CPU分配器<br/>TCMalloc, Jemalloc, Mimalloc]
            GPU_ALLOC[GPU Allocators<br/>GPU分配器<br/>CUDA, Managed Memory]
            NPU_ALLOC[NPU Allocators<br/>NPU分配器<br/>Future Support]
        end
    end

    %% Build and Development Tools
    subgraph "🔨 Build System<br/>构建系统"
        CMAKE[CMake<br/>构建配置]
        CONAN[Conan<br/>依赖管理<br/>Third-party Libraries]

        subgraph "📦 Dependencies<br/>依赖包"
            FMT[fmt<br/>格式化库]
            SPDLOG[spdlog<br/>日志库]
            GTEST[gtest<br/>测试框架]
            TCMALLOC_DEPS[TCMalloc<br/>高性能分配器]
            CUDA_DEPS[CUDA SDK<br/>GPU开发包]
        end
    end

    %% Testing and Quality Assurance
    subgraph "🧪 Testing & QA<br/>测试与质量保证"
        UNIT_TESTS[Unit Tests<br/>单元测试<br/>Allocator, Buffer, Tensor]
        INTEGRATION[Integration Tests<br/>集成测试<br/>End-to-end Pipelines]
        PERF_TESTS[Performance Tests<br/>性能测试<br/>Benchmarking]
        MEMORY_TESTS[Memory Tests<br/>内存测试<br/>Leak Detection]
    end

    %% CI/CD and Deployment
    subgraph "🚀 CI/CD & Deployment"
        GITHUB_ACTIONS[GitHub Actions<br/>自动化流水线]
        BUILD_MATRIX[Build Matrix<br/>构建矩阵<br/>Multi-platform]
        RELEASE[Release Management<br/>版本管理<br/>Binaries, Packages]
    end

    %% Documentation and Community
    subgraph "📚 Documentation & Community"
        DOCS[Technical Docs<br/>技术文档<br/>API, Architecture]
        EXAMPLES[Code Examples<br/>代码示例<br/>Tutorials, Demos]
        COMMUNITY[Community<br/>社区<br/>Issues, Discussions]
    end

    %% Data Flow and Connections
    USER --> APP
    DEV --> SDK
    SYS --> HTTP_API

    APP --> HTTP_API
    HTTP_API --> ENGINE
    SDK --> ENGINE

    ENGINE --> TOKENIZER
    TOKENIZER --> MODEL_EXEC
    MODEL_EXEC --> KV_CACHE
    KV_CACHE --> SAMPLER

    ENGINE --> TENSOR_SYSTEM
    TENSOR_SYSTEM --> BUFFER_MGR
    BUFFER_MGR --> DEVICE_ABS

    TENSOR_SYSTEM --> AMP_CORE
    BUFFER_MGR --> AMP_CORE

    AMP_CORE --> ARENA_ROUTER
    ARENA_ROUTER --> THREAD_CACHE
    THREAD_CACHE --> CENTRAL_CACHE
    CENTRAL_CACHE --> PAGE_HEAP

    ARENA_ROUTER --> CPU_ALLOC
    ARENA_ROUTER --> GPU_ALLOC
    ARENA_ROUTER --> NPU_ALLOC

    CMAKE --> CONAN
    CONAN --> FMT
    CONAN --> SPDLOG
    CONAN --> GTEST
    CONAN --> TCMALLOC_DEPS
    CONAN --> CUDA_DEPS

    UNIT_TESTS --> ENGINE
    INTEGRATION --> ENGINE
    PERF_TESTS --> ENGINE
    MEMORY_TESTS --> AMP_CORE

    CMAKE --> GITHUB_ACTIONS
    GITHUB_ACTIONS --> BUILD_MATRIX
    BUILD_MATRIX --> RELEASE

    DOCS --> EXAMPLES
    EXAMPLES --> COMMUNITY

    %% Styling
    classDef external fill:#e8f4fd,stroke:#1976d2,stroke-width:2px
    classDef application fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
    classDef core fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
    classDef memory fill:#fce4ec,stroke:#c2185b,stroke-width:2px
    classDef build fill:#fff3e0,stroke:#f57c00,stroke-width:2px
    classDef testing fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
    classDef deployment fill:#e0f2f1,stroke:#00695c,stroke-width:2px
    classDef docs fill:#f5f5f5,stroke:#424242,stroke-width:2px

    class USER,DEV,SYS external
    class APP,HTTP_API,SDK application
    class ENGINE,TOKENIZER,MODEL_EXEC,KV_CACHE,SAMPLER,TENSOR_SYSTEM,BUFFER_MGR,DEVICE_ABS core
    class AMP_CORE,ARENA_ROUTER,THREAD_CACHE,CENTRAL_CACHE,PAGE_HEAP,CPU_ALLOC,GPU_ALLOC,NPU_ALLOC memory
    class CMAKE,CONAN,FMT,SPDLOG,GTEST,TCMALLOC_DEPS,CUDA_DEPS build
    class UNIT_TESTS,INTEGRATION,PERF_TESTS,MEMORY_TESTS testing
    class GITHUB_ACTIONS,BUILD_MATRIX,RELEASE deployment
    class DOCS,EXAMPLES,COMMUNITY docs
Loading

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestplanDevelopment plan

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions