HIPCC(1)

πŸ“¦
version 10.0 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– hipcc(1) β€” the HIP compiler, but make it make sense πŸ’–

okay bestie, so this is the manual page for hipcc, and it lives in the User Commands section of the manual (that's the (1) in the corner, iykyk). It's a compiler wrapper, it's iconic, and by the end of this page you're gonna be obsessed. 🫢


✨ NAME ✨

hipcc β€” the HIP compiler. that's it, that's the name, she's simple and she serves πŸ’…


🌸 SYNOPSIS 🌸

usage: hipcc [OPTIONS] FILENAME ...

Like, you give her some OPTIONS, you give her some FILENAME ... (yes plural, she can take many, she's greedy in the best way), and she does her thing. Periodt. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea. The hipcc script is a wrapper β€” she wraps clang or nvcc depending on the value of the HIP_PLATFORM that hipconfig reports. Which one she picks is literally entirely up to that value. No cap.

When you're building for the AMD platform, the options you hand to hipcc get forwarded straight to clang. Like, she's the middleman, she passes them along, no drama.

But wait, there's more πŸ’– β€” the hipcc script also adds extra options to the list of arguments being forwarded. The glow-ups she applies on her own:

  • -x hip β€” forces the compilation language to be HIP. no ambiguity, we're doing HIP today.
  • -O3 β€” added when no optimization level is specified. bestie said default optimization goes hard.
  • --offload-arch β€” added with an autodetected GPU architecture if no target architecture is specified. she looks at your GPU and she knows. πŸ‘‘

πŸŽ€ ENVIRONMENT πŸŽ€

The vibes are configurable, bestie. Here's every environment variable that changes what she does:

  • HIPCC_VERBOSE β€” this environment variable can enable additional output. So if you want her to spill the details, this is the girl for the job. The following flags control the level of verbosity to be printed:
    • 0x1 β€” the clang command being invoked. (not me showing you exactly what I'm running πŸ™ˆ)
    • 0x2 β€” the paths to HIP components.
    • 0x3 β€” the arguments hipcc was called with.
  • HIPCC_COMPILE_FLAGS_APPEND β€” the contents of this variable are added to the end of the argument list that is passed to clang when compiling.
  • HIPCC_LINK_FLAGS_APPEND β€” the contents of this variable are added to the end of the argument list that is passed to clang when linking. (yes she has a separate one for linking, she's organized like that πŸ’…)
  • DEVICE_LIB_PATH β€” this variable is used to override the path to the ROCm device libraries. You want a different path? Say less.
  • HIP_LIB_PATH β€” this variable is used to override the path to the directory containing the HIP runtime library. Another path override, another slay.
  • HIP_CLANG_HCC_COMPAT_MODE β€” this variable is used to specify if clang should enable options that make it more compatible with the old hcc compiler. And what does that include? It includes allowing the half float type to be used in function signatures as arguments or return values. And when you're in this mode, the __HIP_HCC_COMPAT_MODE__ preprocessor macro will also be defined. So like, legacy support but make it cozy 🧚
  • HIP_CLANG_LAUNCHER β€” this environment variable specifies a path to an executable to use for launching HIP clang, which can be useful for making use of a compiler caching tool. Fancy. She's outsourcing the launch and honestly? valid. πŸ”₯
⚠️ bestie, these are overrides and appends β€” they change what actually gets run. Read them before you yeet them into your shell profile, fr fr.

🌈 SEE ALSO 🌈

  • hipconfig(1) β€” the girl who reports the platform in the first place. Go say hi. πŸ’œ

okay and that's the whole page, you ate it, you understood it, you're the main character now πŸ‘‘

This page is for hipcc version 7.0.1, dated October 2025, from the HIPCC(1) manual. Thanks for reading, ily, go compile something beautiful. πŸ“βœ¨πŸ’–

πŸ“¦ where this page comes from