Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

172 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

AI-Workload-Profiler

엣지 AI 워크로드(CV · LLM)의 자원 요구량을 GPU · NPU(FuriosaAI RNGD) 기준으로 예측 · 실측하고, 실행 중인 워크로드를 프로파일링하는 도구 모음.

  • 예측: 모델 그래프 정적 분석으로 연산량(FLOPs) · 메모리 요구량 산출
  • 실측: GPU(Nsight Compute, torch) · NPU(PE cycle 카운터)에서 실제 실행해 측정 · 대조
  • 프로파일링: CPU · GPU · NPU를 한 타임라인에 기록하는 샘플링 프로파일러와 COZ 인과 분석
  • 서비스 연동: KETI ↔ 연세대 프로파일링 gRPC 서비스, 성균관대 SliceWise(MIG 파티셔닝) 연동

저장소 구조

AI-Workload-Profiler/
├── OnEdgeX-Yonsei/        # 자원 요구량 예측 · 실측, 프로파일링 서비스
│   ├── src/
│   │   ├── onnx/            # ONNX 그래프 분석 (FLOPs · 메모리), RNGD 성능 모델, HW 추천
│   │   ├── onnx_c/          # onnx/main.py 의 C 포팅 CLI
│   │   ├── api/             # onnx_c 를 감싼 FastAPI
│   │   ├── profiler/        # estimate.py (예측) · measure.py (실측 · 대조)
│   │   ├── furiosa/         # RNGD 아티팩트 빌드 (CV 컴파일, LLM FXB), 분할 실행
│   │   └── profile_service/ # KETI 연동 gRPC 서버 (1-1/1-2 연산량, 2-1/2-2 샘플링 · COZ)
│   ├── scripts/             # smoke_run.py, k8s 워크로드 · 시나리오, 자체점검 시험 스크립트
│   ├── integration/         # 성균관대 SliceWise 연동 코드 · 데이터
│   ├── mig-gpu-provisioning/# SliceWise MIG 프로비저닝 (Go/k8s 확장, 플래너)
│   ├── workloads/           # 학습 워크로드 이미지 (resnet50-train)
│   ├── kuber_test/          # k8s 실습 (Llama2-7B + CV 추론)
│   ├── setup.sh             # 모델 다운로드 · ONNX 변환 · NPU 아티팩트 빌드
│   └── install-rngd.sh      # FuriosaAI SDK (RNGD) 설치
└── xpu_perf/              # xpuperf: CPU · GPU(CUPTI) · NPU 통합 샘플링 프로파일러
    ├── src/                 # 트레이서 (libxpuperf.so) · 분석기 · 명령
    ├── include/             # 앱용 MARK / PROGRESS 매크로
    ├── python/              # NPU 제출 훅, 요청 단위 ASGI 미들웨어
    ├── k8s/                 # MIG + k3s 서빙 환경
    └── test/                # 데모 워크로드

빠른 시작

# OnEdgeX-Yonsei: 아티팩트 준비 -> 예측 -> 실측 -> 대조
cd OnEdgeX-Yonsei
sh setup.sh
python src/profiler/estimate.py
python src/profiler/measure.py --device gpu      # 또는 --device npu0
python src/profiler/measure.py --report

# xpu_perf: 빌드 후 워크로드 기록 · 분석
cd xpu_perf
make
bin/xpuperf record -o run1 -- python app.py
bin/xpuperf report -i run1

자세한 사용법은 각 디렉토리의 README 참고: OnEdgeX-Yonsei · profiler · furiosa · profile_service · xpu_perf

요구 사항

  • Python 3.10, PyTorch (GPU: CUDA 12.8)
  • GPU 실측: NVIDIA Nsight Compute (ncu)
  • NPU: FuriosaAI RNGD, SDK 2026.4 (install-rngd.sh)
  • xpu_perf: CUDA toolkit + CUPTI, g++ (C++17), ncursesw

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages