3131#include < contrib/easy-encryption/encrypt.h>
3232#endif
3333#include < regex>
34- #if defined( HIPRT_LOAD_FROM_STRING ) || defined( HIPRT_BITCODE_LINKING )
34+ #if defined( HIPRT_BAKE_KERNEL_GENERATED )
3535#include < hiprt/cache/Kernels.h>
3636#include < hiprt/cache/KernelArgs.h>
3737#endif
@@ -49,6 +49,12 @@ constexpr auto UseBakedCode = true;
4949#else
5050constexpr auto UseBakedCode = false ;
5151#endif
52+
53+ #if defined( HIPRT_BAKE_KERNEL_GENERATED )
54+ constexpr auto BakedCodeIsGenerated = true ;
55+ #else
56+ constexpr auto BakedCodeIsGenerated = false ;
57+ #endif
5258} // namespace
5359
5460namespace hiprt
@@ -224,7 +230,7 @@ void Compiler::buildKernels(
224230 std::string extSrc = src;
225231 if ( extended )
226232 {
227- if constexpr ( UseBakedCode || UseBitcode )
233+ if constexpr ( BakedCodeIsGenerated )
228234 {
229235 extSrc = " #include <hiprt_device_impl.h>\n " ;
230236 addCustomFuncsSwitchCase ( extSrc, funcNameSets, numGeomTypes, numRayTypes );
@@ -776,7 +782,7 @@ oroFunction Compiler::getFunctionFromPrecompiledBinary( const std::string& funcN
776782std::string Compiler::buildFunctionTableBitcode (
777783 Context& context, uint32_t numGeomTypes, uint32_t numRayTypes, const std::vector<hiprtFuncNameSet>& funcNameSets )
778784{
779- if constexpr ( UseBitcode )
785+ if constexpr ( BakedCodeIsGenerated )
780786 {
781787 bool amd = oroGetCurAPI ( 0 ) == ORO_API_HIP;
782788
@@ -847,7 +853,7 @@ std::string Compiler::buildFunctionTableBitcode(
847853 }
848854 else
849855 {
850- throw std::runtime_error ( " Not compiled with the bitcode linking support" );
856+ throw std::runtime_error ( " Not compiled with the baked kernel code support" );
851857 }
852858}
853859} // namespace hiprt
0 commit comments