University of Veszprm Department of Image Processing and

  • Slides: 23
Download presentation
University of Veszprém Department of Image Processing and Neurocomputing Emulated Digital CNN-UM Implementation of

University of Veszprém Department of Image Processing and Neurocomputing Emulated Digital CNN-UM Implementation of a 3 -dimensional Ocean Model on FPGAs Zoltán Nagy, Péter Szolgay

Introduction • Cellular Neural/Nonlinear Networks Universal Machine (CNN-UM) • Ocean modeling • Results •

Introduction • Cellular Neural/Nonlinear Networks Universal Machine (CNN-UM) • Ocean modeling • Results • Conclusions Nagy 2 2

Cellular Neural/Nonlinear Networks (CNN) • • 2 or N dimensional grid Locally connected Analog

Cellular Neural/Nonlinear Networks (CNN) • • 2 or N dimensional grid Locally connected Analog processing elements State value is continuous in time Nagy 3 3

Structure of a CNN cell • uij input • xij state • yij output

Structure of a CNN cell • uij input • xij state • yij output Nagy • zij constant bias • Aij, kl feedback template • Bij, kl feed-forward template 4 4

CNN-UM implementations • Software simulation § Easy to implement § Slow, even if using

CNN-UM implementations • Software simulation § Easy to implement § Slow, even if using processor specific instructions • Emulated digital VLSI § § Specialized digital architecture Selectable computing precision (Castle architecture: 1, 6, 12 bit) Orders faster than the software simulation Long design time • Analog VLSI § Huge computing power (~Tera. OP/s) § Low accuracy (7 -8 bit) § Noise and temperature sensitivity Nagy 5 5

Structure of the Falcon emulated digital CNN-UM • Mixer § Contains cell values for

Structure of the Falcon emulated digital CNN-UM • Mixer § Contains cell values for the next updates • Memory unit § Contains a belt of the cell array • Template memory • Arithmetic unit • Processors can be connected on a grid § Linear speedup Nagy 6 6

Structure of the arithmetic unit • Cell update in row wise order • Cycle

Structure of the arithmetic unit • Cell update in row wise order • Cycle time depends on template size • Fully pipelined Nagy 7 7

Configurable parameters • State, template and constant width between 2 to 64 bits •

Configurable parameters • State, template and constant width between 2 to 64 bits • Number of templates • Size of the templates • Width of the cell array slice • Number of layers • Number and arrangement of the processor cores Nagy 8 8

Example: Solution of a simple PDE on CNN • The Wave equation Nagy •

Example: Solution of a simple PDE on CNN • The Wave equation Nagy • Spatial discretization • 2 layer CNN 9 9

Ocean models • Barotropic model • Baroclinic models • Fine resolution models § Real-time

Ocean models • Barotropic model • Baroclinic models • Fine resolution models § Real-time forecast § Fishing industry § Search and rescue § z-coordinate model § σ-coordinate model § isopycnal • Coarse resolution models § Long term predictions § Climate modeling Nagy 10 10

The Princeton Ocean Model (POM) • Sigma coordinate model • Solution technique: Mode splitting

The Princeton Ocean Model (POM) • Sigma coordinate model • Solution technique: Mode splitting § Vertical coordinate is scaled on the water column depth § Internal mode (3 D) o • Second moment turbulence closure sub-model o § External mode (2 D) o § Provides vertical mixing coefficients Nagy Vertical structure equations Implicit solution o 11 Vertically integrated equations Explicit solution (Leapfrog method) 11

Governing equations of the external (2 D) mode • ux, uy mass transport •

Governing equations of the external (2 D) mode • ux, uy mass transport • η free surface elevation • Ω angular rotation of the Earth • Θ latitude Nagy 12 • H depth of the ocean • g gravitational acceleration • τw, τb wind and bottom stress • A lateral viscosity 12

Solution on CNN • Spatial discretization on a uniform grid • 3 -layer CNN

Solution on CNN • Spatial discretization on a uniform grid • 3 -layer CNN structure • Non-linear template required for advection term • Cannot be solved on analog VLSI CNN chips • Solvable on the modified Falcon architecture § Support of non-linearity § Specialized cell model Nagy 13 13

The modified arithmetic unit of the Falcon architecture Nagy 14 14

The modified arithmetic unit of the Falcon architecture Nagy 14 14

Implementation on FPGA • Complicated arithmetic unit • Fixed-point number representation • Configurable precision

Implementation on FPGA • Complicated arithmetic unit • Fixed-point number representation • Configurable precision • High level hardware description language required (e. g. Handel-C) Nagy 15 15

Performance Nagy 16 16

Performance Nagy 16 16

The Seamount problem Nagy 17 17

The Seamount problem Nagy 17 17

Results after 72 hours Circulation pattern Nagy Elevation 18 18

Results after 72 hours Circulation pattern Nagy Elevation 18 18

Error of the solution Nagy 19 19

Error of the solution Nagy 19 19

Error of the solution Nagy 20 20

Error of the solution Nagy 20 20

Memory requirements of the internal (3 D) equations • Extended memory hierarchy § New

Memory requirements of the internal (3 D) equations • Extended memory hierarchy § New level stores 3 cross sectional slices from the 3 D array o o o Large memory required (e. g. 512 x 64 sized grid, 3 x 512 x 64 elements per state variable) Cannot be stored on-chip Off-chip storage requires huge I/O bandwidth • Processor array should be used § The 3 D array is divided between the processors § Optimal data set for on chip storage: 2048 elements per cross sectional slice (512 x 32 x 64 sized grid per processor) § Each processor located on a separate FPGA Nagy 21 21

Solution of the internal (3 D) equations • Implicit solution § Fixed-point solution o

Solution of the internal (3 D) equations • Implicit solution § Fixed-point solution o o Requires large precision to avoid rounding errors Seems to be impractical § Floating-point solution o Requires large area (especially add/sub) • Explicit solution § Smaller timestep § Simpler arithmetic unit Nagy 22 22

Conclusions • Ocean modeling using emulated digital CNN is very promising • Moderate precision

Conclusions • Ocean modeling using emulated digital CNN is very promising • Moderate precision is required in 2 D mode § 1% accuracy using 24 bits • Expected speedup (compared to an Athlon 64 2 GHz microprocessor) § 80 times on our RC 200 prototyping board § 3700 times on the largest available FPGA Nagy 23 23