gpufort icon indicating copy to clipboard operation
gpufort copied to clipboard

WiP: Support derived types and make kernels look more like original Fortran code

Open domcharrier opened this issue 4 years ago • 0 comments

TBC

Major changes:

  • New GPUFORTRT runtime, replaces gpufort_acc_runtime: Complete C++ rewrite of the gpufort_acc_runtime
    • Adds C header file gpufortrt_api.h and a Fortran module gpufortrt_api.f90, so that it can be accessed from C/C++ and Fortran
    • Adds logging with 5+ log levels (controllable via environment variable)

Other changes:

  • bin/gpufort and bin/gpufortfc: Add options to only partially convert a file, e.g. allows to convert only OpenACC compute constructs while not translating any other OpenACC directives.

Changes (unsorted):

  • Rewrite and breakup monolithic templates into individual macros. Use code generation to create python render methods from the macros. Allows to:
    • more flexibly use templates.
    • more easily test template-based code generation.
    • use templates in other GPUFORT python modules.
    • use GPUFORT functionality in other python apps
  • Anticipate new kernel code generation backends:
    • Split fort2hip into generic fort2x part and fort2x.hip part
    • Put abstract codegen base classes and generators into fort2x folder and HIP specific parts into subfolder fort2x/hip.
  • Add module fort2x.hip that provides routines for creating HIP code generators based on string input (Inputs: Fortran declaration list snippet & annotated Fortran loop snippet)
  • Replace hip_auto launcher by hip_ps (ps: problem size), where the first argument is a problem size dim3 that is derived from the range of the translated loop nest.
  • Improve performance of linemapper's preprocessor by using python string & regex features instead of pyparsing when evaluating macros or expressions.
  • CUDA Fortran
    • Support of fixed size device and pinned arrays in programs and procedures.

domcharrier avatar Dec 14 '21 17:12 domcharrier