Skip to main content

Architecture Overview

The Hybridizer can generate source code optimized for a variety of hardware architectures. This allows developers to embrace, with a single version of the source code, execution platforms ranging from low-powered platforms such as ARM processors, to high-end GPUs, through conventional CPUs with ever-wider vector units.

Execution Environments

Supported Hardware Ecosystem​

Intel and AMD x86​

These are the most commoditized processors. The instruction set has constantly expanded while maintaining binary compatibility with former generations. Modern processors offer AVX instructions, enabling SIMD on 4 double precision or 8 single precision registers. The number of cores has continuously increased over the past decade.

Making use of the full capacity of x86 hardware requires:

  • Multiple concurrent threads to use all cores
  • Vector operations to leverage AVX facilities
  • Cache-aware programming to optimize memory access

Parallelization Challenges on x86​

ChallengeSolutions
MultithreadingIntel TBB, OpenMP, pthreads
VectorizationCompiler pragmas (#pragma simd), AVX intrinsics
Cache-awarenessMemory prefetch, local variable usage

NVIDIA GPU​

Since 2004, GPUs have surpassed conventional processors in raw compute power. In early 2007, NVIDIA introduced the CUDA development environment, making General Purpose GPU (GPGPU) computing commonplace. Today, many high-end supercomputers use GPUs to accelerate calculations.

CUDA By Numbers

Parallelization Challenges on GPU​

ChallengeCUDA Concept
MultithreadingCUDA blocks, blockIdx
VectorizationCUDA threads, threadIdx (32-wide warps)
Cache-awarenessShared memory, L1 cache

Concept Mapping​

The Hybridizer maps parallelization concepts across platforms:

CUDAOpenCLHybridizer Vector
blockwork-groupthread (stack frame)
threadwork-itemvector entry (within a vector unit)

This mapping delivers the best performance across platforms while allowing a single version of the source code.

Compilation Pipeline​

Compilation Flow

The compilation process involves several steps:

  1. Input generation: Compile your code using standard tools (C# compiler). Output: .NET binary
  2. Build parameters: Configuration controls how source code for a given flavor is generated
  3. Configuration file generation: The Hybridizer generates a config file based on attributes and annotations
  4. Flavor code generation: Source code is generated for the selected flavor
tip

Hybridizer Essentials wraps all these steps in its Visual Studio integration.

Next Steps​