Skip to content

A Portable Toolkit for deploying Edge AI and HPC (opencl, vulkan, simd, task scheduling)

License

Notifications You must be signed in to change notification settings

cjmcv/pocket-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pocket AI

A Portable Toolkit for deploying Edge AI and HPC

pai::engine
  • cl: A small computing framework based on opencl. This framework is designed to help you quickly call Opencl API to do the calculations you need.

  • vk: A small computing framework based on vulkan. This framework is designed to help you quickly call vulkan's computing API to do the calculations you need.

  • graph: A small multitasking scheduler that can quickly build efficient pipelines for your multiple tasks.

  • infer: A tiny inference engine for microprocessors, with a library size of only 10K+.

pai::memory
  • align_alloc
  • allocator
  • blocking_queue
  • frame_shift_cache
  • huffman_encoder
  • ring_buffer
pai::prof
  • timer
pai::signal
  • rfft / irfft
pai::thread
  • internal_thread
  • thread_pool
pai::util
  • bmp_reader
  • logger
tests

Unit tests

cd tests && ./build_win_x86.bat # windows
cd tests && ./build.sh          # linux
# run
.\bin\unit_tests

NOTE

test -> 单元测试

pai::engine -> graph / vk / cl / infer

pai::type -> Vector (相同使用方式,添加约束进行加速) / Mat

pai::thread -> pthread(gemmlowp-pthread_everywhere) / InternalThread / ThreadPool

pai::memory -> Align / RingBuffer / FrameShift / BlockingQueue / MemReuser(内存复用 / 内存分区,用于管理高速缓存的使用) / MemPool(内存池) / Compressor(数组/权重压缩)

pai::prof -> AsmPeakPerf(宏定义代码块) / Timer(gflops) / MemRecorder (直接替换malloc/calloc)

pai::util -> basic_marco / Logger / Type / PcmReader / BmpReader

scrip -> obfuscator (.a / .hpp)


Usage

直接链接头文件,即可使用。

如:

#include "pocket-ai/engine/graph/graph.hpp"
#include "pocket-ai/engine/cl/engine.hpp"
#include "pocket-ai/engine/vk/engine.hpp"

About

A Portable Toolkit for deploying Edge AI and HPC (opencl, vulkan, simd, task scheduling)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published