GPU Developer's Guide
  • 1. Introduction
  • 2. GPU Execution Architecture in CODE.HEAAN
  • 3. Start a new project with HEaaN
    • 3-1. Create Project Directory
    • 3-2. Set up Basic Directory Structure
    • 3-3. CMake Configuration
    • 3-4. Build and Compile
    • 3-5. Run (gpu-run)
    • 3-6. Check the results
    • Additional tips
  • 4. Example Codes
    • 4-1. CUDA
    • 4-2. HEaaN End to End Example
  • HEaaN GPU Guideline
    • HEaaN GPU Component Overview
    • CudaTools
    • Device Class
    • HEaaN GPU API in use
  • Not supported features
Powered by GitBook

Copyright©️ 2025 CryptoLab, Inc. All rights reserved.

On this page
  • Component Structure
  • Component Roles
  • Example flow

Was this helpful?

  1. HEaaN GPU Guideline

HEaaN GPU Component Overview

PreviousHEaaN GPU GuidelineNextCudaTools

Last updated 7 days ago

Was this helpful?

Component Structure

Component Roles

Component
Layer
Responsibility
Key Features

Devices.hpp

High-level

Device abstraction and management

  • Device type management

  • Device state control

  • Scope-based device switching

CudaTools.hpp

Low-level

CUDA runtime interface

  • CUDA device operations

  • Memory Management

  • Profiling support

Example flow

// High-level usage (Device.hpp)
Device gpuDevice(DeviceType::GPU);
{
    scopedCudaDeviceSelector selector(gpuDevice);
    // Device.hpp internally uses CudaTools.hpp
    // to manage CUDA device
}

// Low-level usage (CudaTools.hpp)
if(HEaaN::CudaTools::isAvailable()) {
    HEaaN::CudaTools::cudaSetDevice(0);
    // ...
    HEaaN::CudaTools::cudaDeviceSynchronize();
}