Skip to content

Commit 1031240

Browse files
committed
Fix baked kernels failure when application has space in its path
1 parent adb8668 commit 1031240

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ParallelPrimitives/RadixSort.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ void RadixSort::compileKernels( const std::string& kernelPath, const std::string
189189
{
190190
if constexpr( usePrecompiledAndBakedKernel )
191191
{
192-
oroFunctions[record.kernelType] = m_oroutils.getFunctionFromPrecompiledBinary_asData( oro_compiled_kernels_h, oro_compiled_kernels_h_size, record.kernelName.c_str() );
192+
// Move the raw buffer into a std::vector, which avoids potential issues explained here: github.com/GPUOpen-LibrariesAndSDKs/HIPRT/pull/38#issuecomment-2761698032
193+
std::vector<unsigned char> binary(oro_compiled_kernels_h, oro_compiled_kernels_h + oro_compiled_kernels_h_size);
194+
oroFunctions[record.kernelType] = m_oroutils.getFunctionFromPrecompiledBinary_asData(binary.data(), binary.size(), record.kernelName.c_str() );
193195
}
194196
else if constexpr( useBakeKernel )
195197
{

0 commit comments

Comments
 (0)