hipify-perl

Contents

hipify-perl#

hipify-perl is an autogenerated perl-based script which heavily uses regular expressions.

Advantages:

  1. Ease of use.

  2. It doesn’t check the input source CUDA code for correctness.

  3. It doesn’t have dependencies on 3rd party tools, including CUDA.

Disadvantages:

  1. Current disability (and difficulty in implementing) of transforming the following constructs:

    • macros expansion;

    • namespaces:

      • redefines of CUDA entities in user namespaces;

      • using directive;

    • templates (some cases);

    • device/host function calls distinguishing;

    • header files correct injection;

    • complicated argument lists parsing.

  2. Difficulties in supporting.

hipify-perl: usage#

perl hipify-perl square.cu > square.cu.hip

hipify-perl: building#

To generate hipify-perl, run hipify-clang --perl. The output directory for the generated hipify-perl file might be specified by --o-hipify-perl-dir option.