Tests: Ensure CUDA bin2c output is null terminated

The default behavior of bin2c is to create binary arrays that have no
null termination.  So to use it as a C array we need to explicitly tell
it to create valid null terminated strings.

This will safely allow us to run PTX tests across all CUDA drivers.
This commit is contained in:
Robert Maynard 2024-10-18 10:00:07 -04:00 committed by Brad King
parent afc2d5b462
commit 0c1d290090

View File

@ -6,7 +6,7 @@ foreach(obj ${OBJECTS})
get_filename_component(obj_dir ${obj} DIRECTORY)
if(obj_ext MATCHES ".ptx")
set(args --name ${obj_name} ${obj})
set(args -p 0x0 --name ${obj_name} ${obj})
execute_process(COMMAND "${BIN_TO_C_COMMAND}" ${args}
WORKING_DIRECTORY ${obj_dir}
RESULT_VARIABLE result