Scroll to navigation

hipify(1) hipify-clang hipify(1)

NAME

hipify-clang - CUDA to HIP source translator

DESCRIPTION

USAGE: hipify-clang [options] <source0> [... <sourceN>]

OPTIONS:

CUDA to HIP source translator options:

-- - Separator between hipify-clang and clang options; don't specify if there are no clang options

-D <macro>=<value> - Define <macro> to <value> or 1 if <value> omitted

-I <directory> - Add directory to include search path

--amap - Try to hipify as much as possible; ignores 'default-preprocessor'

--clang-resource-directory=<directory> - The clang resource path - the path to the parent folder for the 'include' folder, containing '__clang_cuda_runtime_wrapper.h' and other header files used on runtime

--csv - Generate documentation in CSV format

--cuda-gpu-arch=<value> - CUDA GPU architecture (e.g. sm_35); may be specified more than once

--cuda-kernel-execution-syntax - Keep CUDA kernel launch syntax (default)

--cuda-path=<directory> - CUDA installation path

--default-preprocessor - Enable default preprocessor behaviour (synonymous with '--skip-excluded-preprocessor-conditional-blocks')

--doc-format=<value> - Documentation format: 'full' (default), 'strict', or 'compact'; the '--md' or '--csv' option must be specified

--doc-roc=<value> - ROC documentation generation: 'skip' (default), 'separate', or 'joint'; the '--md' or '--csv' option must be specified

--examine - Combine the '-no-output' and '-print-stats' options

--experimental - Hipify HIP APIs that are experimentally supported, otherwise, the corresponding warnings will be emitted

--extra-arg=<string> - Additional argument to append to the compiler command line

--extra-arg-before=<string> - Additional argument to prepend to the compiler command line

--hip-kernel-execution-syntax - Transform CUDA kernel launch syntax to a regular HIP function call (overrides '--cuda-kernel-execution-syntax')

--hipdnn - Enable/disable hipDNN hipification support; disabled by default

--inplace - Modify input file in-place

--local-headers - Enable hipification of quoted local headers (non-recursive)

--local-headers-recursive - Enable hipification of quoted local headers recursively

--md - Generate documentation in Markdown format

--miopen - Translate to 'miopen' instead of 'hip' where it is possible

--no-backup - Don't create a backup file for the hipified source

--no-output - Don't write any translated output to stdout

--no-undocumented-features - Do not rely on undocumented features in code transformation

--no-warnings-on-undocumented-features - Suppress warnings on undocumented features in code transformation

-o <filename> - Output filename

--o-dir=<directory> - Output directory

--o-hipify-perl-dir=<directory> - Output directory for hipify-perl script

--o-python-map-dir=<directory> - Output directory for Python map

--o-stats=<filename> - Output filename for statistics

-p <string> - Build path

--perl - Generate hipify-perl

--print-stats - Print translation statistics

--print-stats-csv - Print translation statistics in a CSV file

--python - Generate hipify-python

--roc - Translate to 'roc' instead of 'hip' where it is possible

--save-temps - Save temporary files

--skip-excluded-preprocessor-conditional-blocks - Enable default preprocessor behaviour by skipping undefined conditional blocks

--temp-dir=<directory> - Temporary directory

-v - Show commands to run and use verbose output

--versions - Display the versions of the supported 3rd-party software

Generic Options:

--help - Display available options (--help-hidden for more)

--help-list - Display list of available options (--help-list-hidden for more)

--version - Display the version of this program

-p <build-path> is used to read a compile command database.

For example, it can be a CMake build directory in which a file named compile_commands.json exists (use -DCMAKE_EXPORT_COMPILE_COMMANDS=ON CMake option to get this output). When no build path is specified, a search for compile_commands.json will be attempted through all parent paths of the first input file . See: https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html for an example of setting up Clang Tooling on a source tree.

<source0> ... specify the paths of source files. These paths are

looked up in the compile command database. If the path of a file is absolute, it needs to point into CMake's source tree. If the path is relative, the current working directory needs to be in the CMake source tree and the file must be in a subdirectory of the current working directory. "./" prefixes in the relative files will be automatically removed, but the rest of a relative path must be a suffix of a path in the compile command database.
Optimized build.
June 2026 hipify-clang