diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp index ab349fbc160..99393a1b968 100644 --- a/intern/cycles/device/hip/device_impl.cpp +++ b/intern/cycles/device/hip/device_impl.cpp @@ -262,7 +262,7 @@ string HIPDevice::compile_kernel(const uint kernel_features, const char *name, c const string kernel_md5 = util_md5_string(source_md5 + common_cflags); const char *const kernel_ext = "genco"; - std::string options = "-Wno-parentheses-equality -Wno-unused-value -ffast-math"; + std::string options = "-Wno-parentheses-equality -Wno-unused-value -ffast-math -std=c++17"; # ifndef NDEBUG options.append(" -save-temps"); @@ -332,7 +332,7 @@ string HIPDevice::compile_kernel(const uint kernel_features, const char *name, c common_cflags.c_str()); LOG_INFO_IMPORTANT << "Compiling " << ((use_adaptive_compilation()) ? "adaptive " : "") - << "HIP kernel ..."; + << "HIP kernel ... " << command; # ifdef _WIN32 command = "call " + command; diff --git a/intern/cycles/device/hiprt/device_impl.cpp b/intern/cycles/device/hiprt/device_impl.cpp index 07fc10dbe58..7ffa202b408 100644 --- a/intern/cycles/device/hiprt/device_impl.cpp +++ b/intern/cycles/device/hiprt/device_impl.cpp @@ -222,25 +222,25 @@ string HIPRTDevice::compile_kernel(const uint kernel_features, const char *name, const char *const kernel_ext = "genco"; string options; - options.append( - "-Wno-parentheses-equality -Wno-unused-value -ffast-math -O3 -std=c++17 -D __HIPRT__"); + options.append("-Wno-parentheses-equality -Wno-unused-value -ffast-math -O3 -std=c++17"); options.append(" --offload-arch=").append(arch.c_str()); -# ifdef WITH_NANOVDB - options.append(" -D WITH_NANOVDB"); -# endif LOG_INFO_IMPORTANT << "Compiling " << source_path << " and caching to " << fatbin; double starttime = time_dt(); - string compile_command = string_printf("%s %s -I %s -I %s --%s %s -o \"%s\"", + string compile_command = string_printf("%s %s -I %s -I %s --%s %s -o \"%s\" %s", hipcc, options.c_str(), include_path.c_str(), hiprt_include_path.c_str(), kernel_ext, source_path.c_str(), - fatbin.c_str()); + fatbin.c_str(), + common_cflags.c_str()); + + LOG_INFO_IMPORTANT << "Compiling " << ((use_adaptive_compilation()) ? "adaptive " : "") + << "HIP-RT kernel ... " << compile_command; # ifdef _WIN32 compile_command = "call " + compile_command;