---
# System prepended metadata

title: Bindings for Icon
tags: [functional cycle 8]

---

# Bindings for Icon

###### tags: `functional cycle 8`

Developers: Christoph, Rico
Appetite: full cycle (if needed)

## Problem

We have demonstrated that (simple) icon stencils can be written in FieldView. But so far we have adapted manually adapt code generated by dawn to instead run the GT4Py generated fencil.

This project is to create a first iteration on an automatic code generation system.

## Background

- The available software stack on tsa (gcc 8.3.0 + CUDA 11) has proven sufficient for integrating gt4py + gridtools with ICON
- The switch to C++17 (and CUDA C++ 17) did not lead to any problems

## Appetite

Full Cycle, (Half Cycle from Rico)

## Known steps

- take the icon stencil code generator from dawn and modify it to read fencil metadata from a file. This metadata is required for verification and creating the fortran array views
- write a new function for this code generator in the dawn CMake
- write code in gt4py that creates the metadata file
- adapt documentation for build and run process
- adapt CI (jenkins plans)
- (optional) Write spack package for new components

## Dangers and Mitigation

- There are some unknowns at every step, so it might take longer than 3 weeks.
- Christoph can spend up to 6 weeks if it takes longer.
- The gt4py side (metafile generation) should definitely be feasible in half a cycle.

## Things to keep in mind

CI plan must work in the end, so start on that early enough.

## Potential Rabbit Holes

- this is a first iteration, elegance is not that important.
- thinking too much about what goes in which repo in the end is probably not productive.

## No Gos

- We think it would be more work than half a cycle to rewrite the code generation necessary for running and verifying the stencils in icon from scratch on the GT4Py side. This should be considered later.
- Changes to Icon build system beyond switching to CUDA 11 should not be necessary.