The default optimization level of nvcc is -O3. There are HIP applications which expect
the default optimization level to be -O3. Most HIP applications use -O3, therefore
making it default.
Details
Details
- Reviewers
tra
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not convinced that nvcc's behavior is a good guide for clang's defaults.
Considering that clang is not compatible with nvcc when it comes to command line options, whoever is using clang to compile CUDA already has to adjust command line options. Explicitly adding -O3 during the process is, IMO, better than requiring everyone to be aware that if the input file is CUDA (or HIP), then clang would default to -O3.